-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (69 loc) · 2.4 KB
/
Copy pathdocs-auto.yml
File metadata and controls
83 lines (69 loc) · 2.4 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: ODK data, Run analysis, and Deploy
on:
# Keep the push trigger for manual updates
push:
branches: [main]
# Add scheduled runs at 11am and 12pm UTC daily
schedule:
- cron: '0 8 * * *' # 11am EAT (8am UTC)
- cron: '0 9 * * *' # 12pm EAT (9am UTC)
# Allow manual triggering
workflow_dispatch:
env:
# `BASE_URL` determines the website is served from, including CSS & JS assets
BASE_URL: /${{ github.event.repository.name }}
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up Python for ODK data processing
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install papermill plotly pandas requests ipykernel
python -m ipykernel install --user --name python3
# Pull data from ODK
- name: Pull data from ODK
run: python .github/pull_odk_data.py
env:
ODK_EMAIL: ${{ secrets.ODK_EMAIL }}
ODK_PASSWORD: ${{ secrets.ODK_PASSWORD }}
# Execute the notebook with papermill
- name: Execute notebook with papermill
run: |
# Adjust the path to your notebook
papermill sampling/odk/morpho-id-auto.ipynb docs/anokin-site/notebooks/morpho-id.ipynb
# Setup Node.js for MyST
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install MyST Markdown
run: npm install -g mystmd
- name: Build HTML Assets
run: cd docs/anokin-site && myst build --html
- name: Debug Build Output
run: ls -R docs/anokin-site/_build/html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/anokin-site/_build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4