Skip to content

Commit ff1a591

Browse files
committed
Update docs.yml
1 parent 9794c31 commit ff1a591

1 file changed

Lines changed: 25 additions & 8 deletions

File tree

.github/workflows/docs.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,23 @@ on:
55
branches: [main]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
817
jobs:
9-
build-and-deploy:
18+
build:
1019
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
1320
steps:
1421
- name: Checkout
1522
uses: actions/checkout@v4
1623

17-
- name: Use Node.js
24+
- name: Setup Node.js
1825
uses: actions/setup-node@v4
1926
with:
2027
node-version: '20'
@@ -26,8 +33,18 @@ jobs:
2633
- name: Build docs
2734
run: npm run docs
2835

29-
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v4
36+
- name: Upload Pages artifact
37+
uses: actions/upload-pages-artifact@v3
3138
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./docs
39+
path: docs
40+
41+
deploy:
42+
runs-on: ubuntu-latest
43+
needs: build
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deploy.outputs.page_url }}
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deploy
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)