build/util: prevent infinite loop if target/ not found #1811
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
# adapted from: | |
# | |
# * base code: https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/ | |
# * fix push auth: https://github.com/ad-m/github-push-action | |
# * checkout PR head commit https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit | |
name: documentation | |
on: | |
push: | |
branches: [master] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Create output directories | |
run: | | |
mkdir -p output/reference | |
mkdir -p output/bugs | |
- name: Copy static website files | |
run: | | |
cp website/index.html output/index.html | |
cp website/style.css output/style.css | |
cp website/bugs/index.html output/bugs/index.html | |
- name: Generate reference | |
id: adocbuild | |
uses: tonynv/asciidoctor-action@master | |
with: | |
program: asciidoctor doc/index.adoc -o output/reference/index.html | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: output # The folder the action should deploy. |