docs: GitHub Actions deploy Workflow (#1644)

pull/1930/head
Luciano Felix 2 years ago committed by GitHub
parent ea4556febc
commit 4a19dde97b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,15 +73,17 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
```yaml ```yaml
name: Deploy name: Deploy
on: on:
workflow_dispatch: {}
push: push:
branches: branches:
- main - main
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -91,16 +93,15 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
node-version: 16 node-version: 16
cache: yarn cache: yarn
- run: yarn install --frozen-lockfile - run: yarn install --frozen-lockfile
- name: Build - name: Build
run: yarn docs:build run: yarn docs:build
- uses: actions/configure-pages@v2
- name: Deploy - uses: actions/upload-pages-artifact@v1
uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} path: docs/.vitepress/dist
publish_dir: docs/.vitepress/dist - name: Deploy
# cname: example.com # if wanna deploy to custom domain id: deployment
uses: actions/deploy-pages@v1
``` ```
::: tip ::: tip

Loading…
Cancel
Save