-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.05 KB
/
publish.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
pull_request:
branches: main
push:
branches: main
name: Quarto Render and Publish
jobs:
build-deploy:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install system dependencies
run: sudo apt update && sudo apt install ghostscript python3-tk
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Make .netrc
env:
NETRC_LOGIN: ${{ secrets.NETRC_LOGIN }}
NETRC_PASSWORD: ${{ secrets.NETRC_PASSWORD }}
run: |
cat <<EOT > ~/.netrc
machine urs.earthdata.nasa.gov
login ${NETRC_LOGIN}
password ${NETRC_PASSWORD}
EOT
- name: Render
env:
CPL_VSIL_CURL_USE_HEAD: FALSE
GDAL_DISABLE_READDIR_ON_OPEN: YES
GDAL_HTTP_COOKIEJAR: /tmp/cookies.txt
GDAL_HTTP_COOKIEFILE: /tmp/cookies.txt
run: |
uv run quarto render
- name: Publish
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: quarto-dev/quarto-actions/publish@v2
with:
target: netlify
render: "false"
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Setup tmate session
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3