Skip to content

interoperability

interoperability #109

name: Make JSON of tutorial registry
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
mkjson:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip" # caching pip dependencies
- name: Install dependencies for validation script
run: pip install jsonschema pillow requests pyyaml
- name: Execute validation script and create output directory
run: |
./tutorial-registry/validate.py --outdir=build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: "build"
deploy:
runs-on: ubuntu-latest
needs: mkjson
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Trigger website build
run: |
curl -XPOST \
-u "scverse-bot:${{ secrets.BOT_GH_TOKEN }}" \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
https://api.github.com/repos/scverse/scverse.github.io/actions/workflows/gh-pages.yml/dispatches \
--data '{"ref": "main"}'