Skip to content

Merge pull request #225 from HuangFuSL/deployment-update #15

Merge pull request #225 from HuangFuSL/deployment-update

Merge pull request #225 from HuangFuSL/deployment-update #15

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: [main]
# Exclude dependabot
paths:
- '.github/**'
- 'docs/**'
- 'main/**'
- 'overrides/**'
- 'third_party/**'
- 'README.md'
- 'mkdocs.yml'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
deploy:
name: Deploy documentation
uses: ./.github/workflows/build.yml
with:
build-type: build
deploy: true
secrets: inherit
detect:
name: Detect changed LaTeX files
runs-on: ubuntu-latest
needs: deploy
outputs:
changed: ${{ steps.detect.outputs.changed }}
steps:
- name: Checkout gh-pages
uses: actions/checkout@v4
- name: Detect changed files
id: detect
run: |
if [[ -n $(git diff HEAD^ HEAD --name-only | grep '.tex$') ]]; then
echo "changed=true" >> $GITHUB_OUTPUT;
else
echo "changed=false" >> $GITHUB_OUTPUT;
fi
latex:
name: Compile LaTeX files
needs: detect
if: needs.detect.outputs.changed == 'true'
uses: ./.github/workflows/latex.yml
secrets: inherit
metrics:
name: Update metrics
needs: deploy
uses: ./.github/workflows/metric.yml
secrets: inherit