generated from uwhackweek/jupyterbook-template
-
Notifications
You must be signed in to change notification settings - Fork 43
51 lines (46 loc) · 1.55 KB
/
build_website.yaml
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
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
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@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Configure NASA Earthdata Login
continue-on-error: true
env:
EARTHDATA_USER: ${{ secrets.EARTHDATA_USER}}
EARTHDATA_PASS: ${{ secrets.EARTHDATA_PASS }}
run: |
echo "machine urs.earthdata.nasa.gov login $EARTHDATA_USER password $EARTHDATA_PASS" > ~/.netrc
chmod 0600 ~/.netrc
- uses: ./.github/actions/buildresources
with:
jb-cache: false
publish-to-gh: false
jb-save: true