-
Notifications
You must be signed in to change notification settings - Fork 6
100 lines (83 loc) · 2.36 KB
/
rebuild_project_page.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Rebuild project page
on:
push:
branches:
- master
- 2.0b
paths:
- 'docs/**'
- 'hiperwalk/**'
workflow_dispatch:
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: hiperwalk/hiperwalk.github.io
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.109.0'
extended: true
- name: Build site
run: hugo
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install graphviz
run: |
sudo apt update
sudo apt install graphviz
- name: Install Gtk related packages
run: |
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 libgtk-3-0 libgtk-3-dev
pip3 install pycairo
pip3 install PyGObject
- name: Checkout hiperwalk source code (stable)
uses: actions/checkout@v3
with:
repository: hiperwalk/hiperwalk
path: hiperwalk
ref: 2.0b
- name: Build docs (stable)
run: |
pushd hiperwalk/docs/
pip3 install -r requirements.txt
./go
popd
- name: Copy Sphinx generated HTML files (stable)
run: |
mkdir -p ./public/docs/stable
cp -r hiperwalk/docs/build/html/* ./public/docs/stable
rm -rf hiperwalk
- name: Checkout hiperwalk source code (latest)
uses: actions/checkout@v3
with:
repository: hiperwalk/hiperwalk
path: hiperwalk
ref: master
- name: Build docs (latest)
run: |
pushd hiperwalk/docs/
pip3 install -r requirements.txt
./go
popd
- name: Copy Sphinx generated HTML files (latest)
run: |
mkdir -p ./public/docs/latest
cp -r hiperwalk/docs/build/html/* ./public/docs/latest
rm -rf hiperwalk
- name: Prevent Jekyll processing
run: touch ./public/.nojekyll
- name: Create CNAME
run: echo 'hiperwalk.org' > ./public/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: hiperwalk/hiperwalk.github.io
publish_branch: gh-pages
publish_dir: ./public