Skip to content

Commit fe9d279

Browse files
authored
Refactor docs deployment workflow
Updated GitHub Actions workflow for documentation deployment, added concurrency settings, and separated build and deploy jobs.
1 parent ca1d13e commit fe9d279

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

.github/workflows/docs.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
name: Deploy Docs
22
on:
33
push:
4-
branches: [main]
4+
branches: [ main ]
5+
workflow_dispatch: {}
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: true
15+
516
jobs:
6-
deploy:
17+
build:
718
runs-on: ubuntu-latest
819
steps:
920
- uses: actions/checkout@v4
1021
- uses: actions/setup-python@v5
11-
with: { python-version: '3.11' }
22+
with:
23+
python-version: '3.11'
1224
- run: pip install mkdocs mkdocs-material mkdocstrings[python]
13-
- run: mkdocs gh-deploy --force
25+
- run: mkdocs build --clean
26+
- uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: site
29+
deploy:
30+
environment:
31+
name: github-pages
32+
url: ${{ steps.deployment.outputs.page_url }}
33+
runs-on: ubuntu-latest
34+
needs: build
35+
steps:
36+
- id: deployment
37+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)