Skip to content

Cache data

Cache data #211

Workflow file for this run

# 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'
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/setup-micromamba@v1.8.1
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 -rf ~/.gmt/sessions
- name: Upload artifacts to GitHub
uses: actions/upload-artifact@v4
with:
name: gmt-cache
path: ~/.gmt