Skip to content

Build and Deploy

Build and Deploy #11

name: Build and Deploy
on:
push:
branches:
- master
workflow_dispatch:
# This is just a guard against two of these actions
# running at the same time. Not likely an issue for
# us right now, but it could happen.
concurrency: build-and-deploy-${{ github.ref }}
jobs:
check-for-doc-changes:
runs-on: ubuntu-latest
steps:
- name: Check for changes in docs folder
id: docs_check
run: |
if git diff --quiet HEAD^ HEAD --name-only | grep -q '^docs/'; then
echo "::set-output name=docs_changed::true"
else
echo "::set-output name=docs_changed::false"
fi
deploy-docs:
runs-on: ubuntu-latest
needs: check_docs_changes

Check failure on line 30 in .github/workflows/build-and-deploy.yml

View workflow run for this annotation

GitHub Actions / Build and Deploy

Invalid workflow file

The workflow is not valid. .github/workflows/build-and-deploy.yml (Line: 30, Col: 12): Job 'deploy-docs' depends on unknown job 'check_docs_changes'.
if: needs.check-for-doc-changes.outputs.docs_changed == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: gh-pages # default for this action, but including to be explicit