Skip to content

Created notebook demonstrating dataset retrieval with ASDF metadata (… #99

Created notebook demonstrating dataset retrieval with ASDF metadata (…

Created notebook demonstrating dataset retrieval with ASDF metadata (… #99

name: Build Workshop Repo
on:
push:
branches:
- "main"
# Allow manual runs through the web UI
workflow_dispatch:
# Push to the main branch of the workshop repo on release
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build_workshop:
runs-on: ubuntu-latest
environment:
name: workshops
steps:
# Make sure the branch name logic handles workflow_dispatch
- name: Branch name for releases
if: ${{ startsWith(github.ref_name, 'v') }}
run: echo 'BRANCHNAME=stable' >> "$GITHUB_ENV"
- name: Branch name for not releases
if: ${{ !startsWith(github.ref_name, 'v') }}
run: echo 'BRANCHNAME=latest' >> "$GITHUB_ENV"
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Python 3.13
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13"
- name: Configure Git
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Install pipx
run: pip install -U pipx
- name: Clone workshop repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
repository: 'DKISTDC/DKIST-Workshop'
fetch-depth: 0
path: 'workshop'
token: '${{ secrets.WORKSHOP_DEPLOY_TOKEN }}'
ref: '${{ env.BRANCHNAME }}'
- name: Purge all files
run: |
rm -r workshop/*
git -C workshop checkout README.md
- name: Run pipx
run: pipx run ./tools/build_workshop_materials.py
- name: Commit and Push
run: |
cd workshop
git add .
git commit -m "Update notebooks from user tools repo"
git push