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