-
Notifications
You must be signed in to change notification settings - Fork 33
96 lines (86 loc) · 2.57 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
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
name: docs
on:
push:
schedule:
- cron: "1 9 * * *"
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date --date='TZ="America/Los_Angeles"' -u "+%Y%m%d")" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- uses: actions/checkout@v3
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: env
use-mamba: true
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: false
installer-parallel: true
- name: Install dependencies
run: |
sudo apt-get install -y libglu1-mesa
poetry install --no-interaction
mamba install slepc4py=*=complex* -y
mamba install julia
pip install jupyter-book
pip install --upgrade jupytext
pip install sphinx=="5.3.0"
pip install docutils=="0.17.1"
pip list
- uses: julia-actions/setup-julia@v1
with:
version: '1.9.2'
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: actions/cache@v3
with:
path: |
docs/_build/.jupyter_cache
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-${{ steps.get-date.outputs.date }}
- name: Make docs
run: |
jupyter-book build docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './docs/_build/html/'
deploy:
if: ${{ github.repository == 'HelgeGehring/femwell' && github.ref == 'refs/heads/main' }} # skip for forks / branches
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
#trigger-binder-build:
# runs-on: [ubuntu-latest]
# steps:
# - uses: s-weigand/trigger-mybinder-build@v1
# with:
# target-repo: HelgeGehring/femwell
# target-state: HEAD
# service-name: gh
# debug: true