Skip to content

Commit 759dcc7

Browse files
committed
fix(ci): use modern github actions for pages deployment
1 parent 4718acf commit 759dcc7

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,39 @@ on:
33
push:
44
branches:
55
- main
6+
7+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
613
jobs:
7-
deploy:
14+
build:
815
runs-on: ubuntu-latest
916
steps:
10-
- uses: actions/checkout@v4
11-
- name: Configure Git Credentials
12-
run: |
13-
git config user.name "github-actions[bot]"
14-
git config user.email "github-actions[bot]@users.noreply.github.com"
15-
- uses: actions/setup-python@v5
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
1621
with:
1722
python-version: 3.x
18-
- run: pip install mkdocs-material
19-
- run: mkdocs gh-deploy --force
23+
- name: Install dependencies
24+
run: pip install mkdocs-material
25+
- name: Build with MkDocs
26+
run: mkdocs build
27+
- name: Upload artifact
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: ./site
31+
32+
deploy:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)