-
Notifications
You must be signed in to change notification settings - Fork 41
70 lines (56 loc) · 1.8 KB
/
build.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
# Github action to build sphinx site and commit to gh-pages branch
#
# Built site is pushed to 'gh-pages' branch
#
name: Sphinx Build
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "0 3 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gcc: [10]
steps:
- name: Checkout page source
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install GFortran (Linux)
run: |
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc }}
- name: Install sphinx
run: pip3 install --user -r requirements.txt
- name: delete _data folder
run: rm -Rf _data
- name: download _data
run: mkdir _data && cd _data && gh run download -n _data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build page
run: python3 build.py
- run: touch build/html/.nojekyll
- name: Create Bing authentification
run: |
echo > build/html/BingSiteAuth.xml \
"<?xml version=\"1.0\"?><users><user>${{ env.BING_TOKEN }}</user></users>"
env:
BING_TOKEN: ${{ secrets.BING_TOKEN }}
- name: Deploy documentation sphinx
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: build/html
clean: false
git-config-email: [email protected]
git-config-name: Fortran