Update pull request template #2972
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: Build and Deploy Docs | |
on: | |
push: | |
branches: [ development ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ development ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }}-docs | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install pypandoc_binary mkdocs-material>=9.5.9 mkdocs-include-markdown-plugin>=6.0.4 mkdocs-exclude>=1.0.2 mkdocs-macros-plugin>=1.0.4 pymdown-extensions mkdocs-awesome-pages-plugin mkdocs-material mkdocs-bibtex==2.15.0 | |
- name: Install and Build | |
run: | | |
./build_docs.sh | |
- name: Archive artifact | |
shell: sh | |
run: | | |
chmod -c -R +rX "$INPUT_PATH" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
tar \ | |
--dereference --hard-dereference \ | |
--directory "$INPUT_PATH" \ | |
-cvf "$RUNNER_TEMP/artifact.tar" \ | |
--exclude=.git \ | |
--exclude=.github \ | |
. | |
env: | |
INPUT_PATH: ./docs/site | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: 'github-pages' | |
path: ${{ runner.temp }}/artifact.tar | |
retention-days: 1 | |
deploy: | |
if: github.event_name == 'push' && github.repository == 'quokka-astro/quokka' && github.ref == 'refs/heads/development' | |
environment: | |
name: github-pages | |
url: quokka-astro.github.io | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |