forked from MilesCranmer/PySR
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.53 KB
/
docs.yml
File metadata and controls
62 lines (59 loc) · 1.53 KB
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
name: Documentation
on:
push:
branches:
- master
tags: "*"
paths:
- 'pysr/**'
- '.github/workflows/docs.yml'
- 'docs/**'
- 'README.md'
pull_request:
branches:
- master
paths:
- 'pysr/**'
- '.github/workflows/docs.yml'
- 'docs/**'
- 'README.md'
workflow_dispatch:
permissions:
contents: write
pull-requests: read
statuses: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [primary, secondary]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: docs/package-lock.json
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- name: Install julia deps
run: julia --project=docs -e 'using Pkg; Pkg.instantiate()'
- name: Install python deps
run: pip install -e .[docs]
- name: Install npm deps
run: npm ci
working-directory: docs
- name: Generate documentation markdown
run: npm run gen:params && npm run gen:api && npm run gen:index && npm run gen:papers
working-directory: docs
- name: Deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DAMTP_DEPLOY_KEY: ${{ secrets.DAMTP_DEPLOY_KEY }}
DEPLOYMENT_TARGET: ${{ matrix.target }}
run: julia --project=docs docs/deploy.jl