Skip to content

Commit 0cc4c3a

Browse files
committed
ci(docs): switch GitHub Pages deploy to official actions
1 parent 767832f commit 0cc4c3a

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/docs.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,23 @@ on:
66
workflow_dispatch: {}
77

88
permissions:
9-
contents: write
9+
contents: read
10+
pages: write
11+
id-token: write
1012

1113
concurrency:
12-
group: docs-${{ github.ref }}
13-
cancel-in-progress: true
14+
group: pages
15+
cancel-in-progress: false
1416

1517
jobs:
16-
deploy:
18+
build:
1719
runs-on: ubuntu-latest
1820
steps:
1921
- uses: actions/checkout@v4
2022

23+
- name: Setup Pages
24+
uses: actions/configure-pages@v5
25+
2126
- name: Setup Node
2227
uses: actions/setup-node@v4
2328
with:
@@ -31,12 +36,22 @@ jobs:
3136

3237
- name: Build
3338
working-directory: docs
34-
run: npm run build
39+
run: |
40+
npm run build
41+
touch .vuepress/dist/.nojekyll
3542
36-
- name: Deploy
37-
uses: peaceiris/actions-gh-pages@v4
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
3845
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
publish_branch: gh-pages
41-
publish_dir: docs/.vuepress/dist
42-
enable_jekyll: false
46+
path: docs/.vuepress/dist
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)