-
Notifications
You must be signed in to change notification settings - Fork 76
56 lines (48 loc) · 1.44 KB
/
cache-data.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
# This workflow downloads data used in the documentation and uploads as an artifact
name: Cache data
on:
# Uncomment the 'pull_request' line below to manually re-cache data artifacts
# pull_request:
# Schedule runs on 12 noon every Sunday
schedule:
- cron: '0 12 * * 0'
workflow_dispatch:
jobs:
gmt_cache:
name: Cache GMT artifacts
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Micromamba
uses: mamba-org/[email protected]
with:
environment-name: gmtdocs
condarc: |
channels:
- conda-forge
- nodefaults
create-args: >-
gmt=6.5.0
- name: Download data and change configurations
run: bash scripts/setup-ci.sh
- name: Check files
run: |
ls -lhR ~/.gmt
gmt text -L
cat ~/.gmt/cidfmap
cat ~/.gmt/PSL_custom_fonts.txt
# We don't want to cache GMT's sessions directory
- name: Clear GMT's sessions
# Can't use 'gmt clear sessions' because it returns non-zero exit code
# when sessions directory don't exist.
run: rm -rvf ~/.gmt/sessions
- name: Upload artifacts to GitHub
uses: actions/[email protected]
with:
name: gmt-cache
path: ~/.gmt
include-hidden-files: true