Skip to content

Commit

Permalink
Add deployment CI workflow
Browse files Browse the repository at this point in the history
vanderwb committed May 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 768cb0b commit fc03087
Showing 2 changed files with 30 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
11 changes: 2 additions & 9 deletions .github/workflows/verify_default_theme.yml
Original file line number Diff line number Diff line change
@@ -12,12 +12,5 @@ jobs:

- name: Verify theme.yml
run: |
[[ -L theme.yml ]] || { echo "ERROR: theme.yml should be a symlink -> themes/NCAR_primary.yml"; exit 1; }
[[ "$(readlink theme.yml)" == "themes/NCAR_primary.yml" ]] || { echo "ERROR: theme.yml should be a symlink -> themes/NCAR_primary.yml"; exit 1; }
# (no longer required - embedded in themes/*/css)
# - name: Verify docs/stylesheets/custom.css
# run: |
# cd docs/stylesheets/
# [[ -L custom.css ]] || { echo "ERROR: custom.css should be a symlink -> NCAR_primary.css"; exit 1; }
# [[ "$(readlink custom.css)" == "NCAR_primary.css" ]] || { echo "ERROR: custom.css should be a symlink -> NCAR_primary.css"; exit 1; }
[[ -L theme.yml ]] || { echo "ERROR: theme.yml should be a symlink -> themes/SEA.yml"; exit 1; }
[[ "$(readlink theme.yml)" == "themes/SEA.yml" ]] || { echo "ERROR: theme.yml should be a symlink -> themes/SEA.yml"; exit 1; }

0 comments on commit fc03087

Please sign in to comment.