Skip to content

Commit 0180db3

Browse files
committed
Deploy to GitHub Pages using native actions
1 parent 68b7ab6 commit 0180db3

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ on:
99
- cron: '0 6 * * 6'
1010
jobs:
1111
build:
12-
name: Deploy docs
1312
runs-on: ubuntu-latest
1413
steps:
1514
- name: Download source
16-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1716
- name: Install Python
1817
uses: actions/setup-python@v4
1918
with:
@@ -25,9 +24,21 @@ jobs:
2524
- name: Build site
2625
run: mkdocs build
2726
working-directory: docs
28-
- name: Deploy to gh-pages
29-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
30-
uses: oprypin/push-to-gh-pages@v3
27+
- name: Upload to GitHub Pages
28+
uses: actions/upload-pages-artifact@v2
3129
with:
32-
publish_dir: site
33-
commit_message: 'Generate docs: '
30+
path: site
31+
deploy:
32+
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
33+
needs: build
34+
permissions:
35+
pages: write
36+
id-token: write
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v2
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)