Skip to content

Commit ff610c3

Browse files
committed
ci: auto-deploy docs to gh-pages on push to main
1 parent b40cd77 commit ff610c3

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/docs.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: write
11+
912
jobs:
10-
build:
13+
build-and-deploy:
1114
runs-on: ubuntu-latest
1215

1316
steps:
14-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1518

1619
- name: Set up Python
17-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
1821
with:
1922
python-version: '3.10'
2023

@@ -34,3 +37,10 @@ jobs:
3437
with:
3538
name: documentation
3639
path: docs/_build/html
40+
41+
- name: Deploy to GitHub Pages
42+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
43+
uses: peaceiris/actions-gh-pages@v4
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: docs/_build/html

0 commit comments

Comments
 (0)