-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (73 loc) · 2.16 KB
/
deploy.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
name: deploy
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the main branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
-
name: Install
run: pip install -r requirements.txt
-
name: Build DE
run: |
cd CETONI_Elements_Manual_DE
make html
cd ..
-
name: Build DE private
run: |
cd CETONI_Elements_Manual_DE
export PRIVATE_DOC=1
export PRIVATE_BUILD_DIR=_build_private
make html
mv _build_private/html/index_private.html _build_private/html/index.html
cd ..
-
name: Build EN
run: |
cd CETONI_Elements_Manual_EN
make html
cd ..
-
name: Build EN private
run: |
cd CETONI_Elements_Manual_EN
export PRIVATE_DOC=1
export PRIVATE_BUILD_DIR=_build_private
make html
mv _build_private/html/index_private.html _build_private/html/index.html
cd ..
-
name: Prepare Deployment
run: |
mkdir -p _deploy/manual_de
cp -R CETONI_Elements_Manual_DE/_build/html/* _deploy/manual_de
mkdir -p _deploy/manual_en
cp -R CETONI_Elements_Manual_EN/_build/html/* _deploy/manual_en
mkdir -p _deploy/manual_de_private
cp -R CETONI_Elements_Manual_DE/_build_private/html/* _deploy/manual_de_private
mkdir -p _deploy/manual_en_private
cp -R CETONI_Elements_Manual_EN/_build_private/html/* _deploy/manual_en_private
-
name: Nojekyll
run: touch _deploy/.nojekyll
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: _deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}