Skip to content

Added jupyterhub tutorial and AI2ES logo #69

Added jupyterhub tutorial and AI2ES logo

Added jupyterhub tutorial and AI2ES logo #69

name: Test website build across operating systems
on:
schedule:
# run this once a week (sunday midnight) to preserve cache
# https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
- cron: '0 0 * * 0'
pull_request_target:
types: [labeled, synchronize]
paths:
- '.github/**/*'
- '{{ cookiecutter.repo_directory }}/**'
- 'book/**/*'
- 'conda/**'
- 'scripts/**'
- 'cookiecutter.yaml'
branches:
- main
env:
NCDC_CDO_TOKEN: ${{ secrets.NCDC_CDO_TOKEN }}
jobs:
build-and-test:
# This workflow accesses secrets (~/.netrc) so only run if labelled by repo owner
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
if: contains(github.event.pull_request.labels.*.name, 'preview')
name: Build and test on OS - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Print token to file.
shell: bash -l {0}
run: |
echo "Token: ${NCDC_CDO_TOKEN}"
echo ${NCDC_CDO_TOKEN} > ./book/tutorials/NCEI_Tutorial/token.txt
- uses: ./.github/actions/buildresources
with:
jb-cache: false
publish-to-gh: false
jb-save: true
ncdc-cdo-token: ${{ secrets.NCDC_CDO_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}