forked from pypa/sampleproject
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (35 loc) · 1.14 KB
/
docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: deploy documentation built with mkdocs as github pages
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
jobs:
# Single deploy job no building
deploy:
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4 # https://github.com/actions/setup-python
with:
python-version: "3.11"
- uses: actions/configure-pages@v3
- run: sudo apt-get update && sudo apt-get install tree
- run: | # replace symlinks with actual files
cp -r template src/init_python_project/.
cp copier.yaml src/init_python_project/.
- run: | # creating example projects using copier requires a git identity
git config --global user.name "ci-runner"
git config --global user.email "ci-runner@github.com"
- run: python -m pip install .[doc]
- run: make docs
- uses: actions/upload-pages-artifact@v2
with:
path: "build/docs"
- id: deployment
uses: actions/deploy-pages@v2