-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish_docs.yml
More file actions
52 lines (48 loc) · 1.15 KB
/
publish_docs.yml
File metadata and controls
52 lines (48 loc) · 1.15 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
name: Publish Docs
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd docs
pip install -r requirements.txt
- name: Show contents of working dir
working-directory: ./docs
run: |
ls -la $PWD
- name: Build sphinx documentation
working-directory: ./docs
run: |
make html
cd _build/html
touch .nojekyll
- name: Create documentation artifact
run: |
tar -cvf docs_build.tar _build/html
- name: 'Upload artifact'
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ./docs_build.tar
deploy:
needs: build
runs-on: ubuntu-latest
environment: github-pages
steps:
- name: Publish on GitHub pages
uses: actions/deploy-pages@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}