Skip to content

Commit a2302eb

Browse files
committed
Improve Github Pages deployment
1 parent de1d427 commit a2302eb

1 file changed

Lines changed: 30 additions & 18 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
name: docs
2-
32
on:
43
push:
54
branches: [ "master" ]
65
paths: [ "docs/**", "mkdocs.yml" ]
7-
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
810
jobs:
9-
deploy:
11+
build:
12+
environment:
13+
name: github-pages
14+
url: ${{ steps.deployment.outputs.page_url }}
1015
runs-on: ubuntu-latest
1116
steps:
12-
- name: Checkout LWS Source
13-
uses: actions/checkout@v4
14-
- name: Setup Python
15-
uses: actions/setup-python@v6
16-
- name: Install dependencies
17-
run: |
18-
python3 -m pip install --upgrade pip
19-
python3 -m pip install mkdocs
20-
python3 -m pip install mkdocs-swagger-ui-tag
21-
python3 -m pip install mkdocs-schema-reader
22-
mkdocs build
23-
- name: Deploy
24-
uses: peaceiris/actions-gh-pages@v4
17+
- uses: actions/configure-pages@v5
18+
- uses: actions/checkout@v5
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.x
22+
- run: |
23+
python3 -m pip install mkdocs
24+
python3 -m pip install mkdocs-swagger-ui-tag
25+
python3 -m pip install mkdocs-schema-reader
26+
- uses: actions/upload-pages-artifact@v4
27+
id: deployment
2528
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
publish_dir: ./site
29+
path: site
30+
deploy:
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
needs: build
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)