-
Notifications
You must be signed in to change notification settings - Fork 18
75 lines (62 loc) · 2.09 KB
/
docs.yml
File metadata and controls
75 lines (62 loc) · 2.09 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: docs
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for main
push:
branches:
- main
- fixing-docs
release:
types:
- published
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
docs:
name: Deploy docs
runs-on: ubuntu-latest
env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: true
SHELLOPTS: 'errexit:pipefail'
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
with:
# Need to fetch more than the last commit so that setuptools_scm can
# create the correct version string. If the number of commits since
# the last release is greater than this, the version will still be
# wrong. Increase if necessary.
fetch-depth: 100
# The GitHub token is preserved by default but this job doesn't need
# to be able to push to GitHub.
persist-credentials: false
# Need the tags so that setuptools_scm can form a valid version number
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Setup Headless Display
run: |
sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
pip install -e .
- name: Generate Docs & Check Links
working-directory: docs/
run: make html
- name: Publish generated content to GitHub Pages
uses: tsunematsu21/actions-publish-gh-pages@v1.0.1
with:
dir: docs/build/html
branch: gh-pages
token: ${{ secrets.ACCESS_TOKEN }}