Skip to content

Commit 4a19dde

Browse files
authored
docs: GitHub Actions deploy Workflow (#1644)
1 parent ea4556f commit 4a19dde

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/guide/deploying.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
7373

7474
```yaml
7575
name: Deploy
76-
7776
on:
77+
workflow_dispatch: {}
7878
push:
7979
branches:
8080
- main
81-
8281
jobs:
8382
deploy:
8483
runs-on: ubuntu-latest
84+
environment:
85+
name: github-pages
86+
url: ${{ steps.deployment.outputs.page_url }}
8587
steps:
8688
- uses: actions/checkout@v3
8789
with:
@@ -91,16 +93,15 @@ Don't enable options like _Auto Minify_ for HTML code. It will remove comments f
9193
node-version: 16
9294
cache: yarn
9395
- run: yarn install --frozen-lockfile
94-
9596
- name: Build
9697
run: yarn docs:build
97-
98-
- name: Deploy
99-
uses: peaceiris/actions-gh-pages@v3
98+
- uses: actions/configure-pages@v2
99+
- uses: actions/upload-pages-artifact@v1
100100
with:
101-
github_token: ${{ secrets.GITHUB_TOKEN }}
102-
publish_dir: docs/.vitepress/dist
103-
# cname: example.com # if wanna deploy to custom domain
101+
path: docs/.vitepress/dist
102+
- name: Deploy
103+
id: deployment
104+
uses: actions/deploy-pages@v1
104105
```
105106
106107
::: tip

0 commit comments

Comments
 (0)