Skip to content

Commit 267af22

Browse files
committed
Deploy to GitHub Pages using native actions
1 parent 1e58665 commit 267af22

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
@@ -6,11 +6,10 @@ on:
66
- cron: '0 6 * * 6'
77
jobs:
88
build:
9-
name: Deploy docs
109
runs-on: ubuntu-latest
1110
steps:
1211
- name: Download source
13-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1413
- name: Install Python
1514
uses: actions/setup-python@v4
1615
with:
@@ -19,9 +18,21 @@ jobs:
1918
run: pip install --no-deps -r docs/requirements.txt
2019
- name: Build site
2120
run: mkdocs build
22-
- name: Deploy to gh-pages
23-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
24-
uses: oprypin/push-to-gh-pages@v3
21+
- name: Upload to GitHub Pages
22+
uses: actions/upload-pages-artifact@v2
2523
with:
26-
publish_dir: site
27-
commit_message: 'Generate docs: '
24+
path: site
25+
deploy:
26+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
27+
needs: build
28+
permissions:
29+
pages: write
30+
id-token: write
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)