Skip to content

Commit c43912e

Browse files
rsignellclaude
andcommitted
Add GitHub Actions workflow to build STAC catalog every 3 hours
Runs build_dynamical_stac.py on a schedule (every 3 hours) and on manual dispatch. Sets up micromamba from environment.yml, installs cloudify from local source, then builds and pushes to the OpenScienceComputing/dynamical-stac GitHub Pages repo. Requires a PAGES_PAT secret with write access to dynamical-stac. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0d7f7ef commit c43912e

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build dynamical.org STAC Catalog
2+
3+
on:
4+
schedule:
5+
- cron: '0 */3 * * *' # every 3 hours
6+
workflow_dispatch: # allow manual runs from the Actions tab
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: mamba-org/setup-micromamba@v2
16+
with:
17+
environment-file: environment.yml
18+
cache-environment: true
19+
init-shell: bash
20+
21+
- name: Install cloudify from local source
22+
run: micromamba run -n cloudify-notebooks pip install -e . --no-deps
23+
24+
- name: Clone GitHub Pages repo
25+
env:
26+
PAGES_PAT: ${{ secrets.PAGES_PAT }}
27+
run: |
28+
git clone "https://x-access-token:${PAGES_PAT}@github.com/OpenScienceComputing/dynamical-stac.git" /tmp/dynamical-stac
29+
git -C /tmp/dynamical-stac config user.email "github-actions[bot]@users.noreply.github.com"
30+
git -C /tmp/dynamical-stac config user.name "github-actions[bot]"
31+
32+
- name: Build and publish catalog
33+
run: |
34+
micromamba run -n cloudify-notebooks python scripts/build_dynamical_stac.py \
35+
--no-upload \
36+
--public-domain opensciencecomputing.github.io/dynamical-stac \
37+
--catalog-prefix stac/dynamical \
38+
--github-pages /tmp/dynamical-stac \
39+
--github-pages-push

0 commit comments

Comments
 (0)