-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (45 loc) · 1.3 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
name: "Pull Request Docs Check"
on:
- push
defaults:
run:
shell: bash -l {0}
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup env
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: lstmcpipe
use-mamba: true
- name: Update environment
run: |
mamba env update -n lstmcpipe -f environment.yml
mamba install -n lstmcpipe -c conda-forge make pandoc
if: steps.cache.outputs.cache-hit != 'true'
- name: Build docs
run: |
git config --global --add safe.directory '*'
cd docs
make html
cd ..
- uses: actions/upload-artifact@v4
with:
name: DocumentationHTML
path: docs/_build/html/
- name: Deploy to github pages
# only run on push to master
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/_build/html
CLEAN: true
SINGLE_COMMIT: true