-
Notifications
You must be signed in to change notification settings - Fork 48
64 lines (58 loc) · 2.02 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
name: Build, test, and upload docs
on:
push:
branches: [ main ]
pull_request_target:
branches: [ main ]
jobs:
request_clearance: # First step
runs-on: ubuntu-latest
steps:
- name: Request clearance
run: echo For security reasons, all pull requests need to be cleared before running any automated CI involving tokens.
docs:
runs-on: ubuntu-latest
needs: [request_clearance]
environment:
name: Integrate Pull Request # dummy environment
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies and use default config
run: |
sudo apt-get update
sudo apt install texlive texlive-latex-extra texlive-fonts-recommended dvipng cm-super --fix-missing
python -m pip install --upgrade pip
pip install wheel latex poetry
poetry install
cp config.defaults.yaml config.yaml
poetry run scope-develop
- name: Lint sources
run: |
poetry run scope-lint
- name: Build docs
env:
KOWALSKI_INSTANCE_TOKEN: ${{ secrets.KOWALSKI_INSTANCE_TOKEN }}
GLORIA_INSTANCE_TOKEN: ${{ secrets.GLORIA_INSTANCE_TOKEN }}
MELMAN_INSTANCE_TOKEN: ${{ secrets.MELMAN_INSTANCE_TOKEN }}
run: |
poetry run scope-doc
- name: Install SSH Client 🔑
if: github.event_name == 'push' && github.repository_owner == 'ZwickyTransientFacility'
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.CI_DEPLOY_KEY }}
- name: Deploy docs
if: github.event_name == 'push' && github.repository_owner == 'ZwickyTransientFacility'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
folder: doc/_build/html
repository-name: ZwickyTransientFacility/scope-docs
branch: master
single-commit: true
ssh-key: true