-
Notifications
You must be signed in to change notification settings - Fork 34
96 lines (80 loc) · 2.51 KB
/
build-test-doc_upload.yaml
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: Build, test, and upload docs
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build-test-doc:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.repository_owner == 'fritz-marshal' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/cache@v4
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package.json') }}
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }}
# caching dustmap & sncosmo files is dependent on their corresponding
# python package versions, so we use that as the cache key
- uses: actions/cache@v4
with:
path: |
persistentdata/dustmap/sfd
key: ${{ runner.os }}-dustmap-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-dustmap-${{ hashFiles('**/requirements*.txt') }}
${{ runner.os }}-dustmap-
- uses: actions/cache@v4
with:
path: |
~/.astropy/cache/sncosmo/bandpasses
key: ${{ runner.os }}-sncosmo-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-sncosmo-${{ hashFiles('**/requirements*.txt') }}
${{ runner.os }}-sncosmo-
- name: Install system dependencies
run: |
sudo apt update -y && sudo apt install -y libcurl4-gnutls-dev libgnutls28-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
./fritz develop
- name: Lint sources
run: |
./fritz lint
- name: Build docs
run: |
pip install wheel
pip install -r skyportal/requirements.txt
pip install -r skyportal/baselayer/requirements.txt
./fritz doc --yes
- name: Deploy docs
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
folder: doc/_build/html
repository-name: fritz-marshal/doc
branch: main
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}