-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (42 loc) · 1.33 KB
/
docs.yml
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
name: 'docs'
on: [ push, pull_request ]
env:
# https://github.com/tox-dev/tox/issues/1468
PY_COLORS: 1
CLONE_VUNIT: git clone --recurse-submodules -j4 https://github.com/VUnit/vunit ../vunit
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: install dependencies
run: |
pip install -U pip --progress-bar off
pip install -U virtualenv tox --progress-bar off
- name: get VUnit
run: $CLONE_VUNIT
- name: build docs
run: tox -e py38-docs -- --color
- uses: actions/upload-artifact@master
with:
name: VUnit-site
path: .tox/py38-docs/tmp/docsbuild/
- name: 'publish site to gh-pages'
if: github.event_name != 'pull_request' && github.repository == 'VUnit/cosim'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd .tox/py38-docs/tmp/docsbuild/
touch .nojekyll
git init
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
git commit -a -m "update ${{ github.sha }}"
git remote add origin https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY
git push -u origin +HEAD:gh-pages