forked from VUnit/vunit
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (45 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
58
name: 'docs'
on: [ push, pull_request ]
env:
# https://github.com/tox-dev/tox/issues/1468
PY_COLORS: 1
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -U pip --progress-bar off
pip install -U virtualenv tox --progress-bar off
- name: Build docs
run: tox -e py310-docs -- --color
- uses: actions/upload-artifact@v2
with:
name: VUnit-site
path: .tox/py310-docs/tmp/docsbuild/
- name: Publish site to gh-pages
if: github.event_name != 'pull_request' && github.repository == 'VUnit/vunit'
env:
GH_DEPKEY: ${{ secrets.VUNIT_GITHUB_IO_DEPLOY_KEY }}
run: |
cd .tox/py310-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 [email protected]:VUnit/VUnit.github.io
eval `ssh-agent -t 60 -s`
echo "$GH_DEPKEY" | ssh-add -
mkdir -p ~/.ssh/
ssh-keyscan github.com >> ~/.ssh/known_hosts
git push -u origin +master
ssh-agent -k