Skip to content

Commit df2c2a8

Browse files
committed
Update generate-documentation workflow
1 parent 71ca9b1 commit df2c2a8

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

.github/workflows/generate-documentation.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
pull_request:
88
branches: [main]
99

10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
1018
jobs:
1119
run:
1220
runs-on: ubuntu-latest
@@ -27,8 +35,23 @@ jobs:
2735
- name: Generate documentation
2836
run: python3 docs_src/generate.py
2937

30-
- name: Save artifafts
31-
uses: actions/upload-artifact@v4
38+
- name: Upload GitHub Pages artifact
39+
uses: actions/upload-pages-artifact@v3
3240
with:
33-
name: docs
3441
path: docs
42+
43+
deploy:
44+
if: github.ref == 'refs/heads/main'
45+
46+
needs: run
47+
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)