Skip to content

Commit d7e6b4c

Browse files
committed
Use actions/deploy-pages for documentation deployment
1 parent 20143ab commit d7e6b4c

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/docs.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,26 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
- name: Create dummy documentation
13+
- name: Build documentation
1414
run: |
15-
mkdir -p docs/_build/html
16-
echo "Hello, world!" > docs/_build/html/index.html
17-
- name: Deploy to GitHub Pages
18-
uses: peaceiris/actions-gh-pages@v3
15+
pip install sphinx sphinx_rtd_theme
16+
sphinx-apidoc -o docs/source Grouper
17+
make -C docs html
18+
- name: Upload artifact
19+
uses: actions/upload-pages-artifact@v1
1920
with:
20-
github_token: ${{ secrets.GITHUB_TOKEN }}
21-
publish_dir: docs/_build/html
21+
path: docs/_build/html
22+
23+
deploy:
24+
needs: build
25+
runs-on: ubuntu-latest
26+
permissions:
27+
pages: write
28+
id-token: write
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
steps:
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)