chore(GHA) ignore dependabot branches #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Slides Workflow | |
on: | |
create: | |
tags: | |
- '*' | |
push: | |
branches-ignore: | |
- gh-pages | |
- dependabot/* | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-slides: | |
name: 'Build Slides' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Set Environment' | |
run: | | |
echo "REPOSITORY_URL=https://github.com/${{ github.repository }}" >> "$GITHUB_ENV" | |
echo "PRESENTATION_URL=https://${{ github.repository_owner }}.github.io/${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}/${{ github.ref_name }}" >> "$GITHUB_ENV" | |
- name: 'Check environment' | |
run: | | |
docker compose version | |
echo $REPOSITORY_URL | |
echo $PRESENTATION_URL | |
- name: 'Checkout' | |
uses: actions/checkout@master | |
- name: 'Build' | |
run: make build | |
- name: PDF on main branch | |
run: make pdf # Reuses the 'make build' steps | |
- name: 'Verify' | |
run: make verify | |
- name: 'Upload dist/ as artefact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/ | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build-slides] | |
# Only run deploy when pushing code on a branch of the repository | |
if: github.event_name == 'push' | |
steps: | |
- name: 'Download dist/ Artefacts' | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: ./dist | |
- name: 'Deploy to GitHub Pages' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
destination_dir: ${{ github.ref_name }}/ |