Quarto Publish Development Version #38
This file contains hidden or 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: Quarto Publish Development Version | |
on: | |
workflow_dispatch: | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Install Python and Dependencies | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- run: pip install jupyter | |
- run: pip install -r doc/requirements-doc.txt | |
- name: Render Quarto Project with Development Profile | |
uses: quarto-dev/quarto-actions/render@v2 | |
with: | |
path: ./doc | |
to: html | |
env: | |
QUARTO_PROFILE: dev | |
- name: Move rendered files to a temporary location | |
run: mv ./doc/_site/dev /tmp/quarto-site | |
- name: Check out gh-pages branch | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
fetch-depth: 0 | |
- name: Remove existing dev folder if present | |
run: | | |
if [ -d "dev" ]; then | |
rm -rf dev | |
fi | |
- name: Copy rendered files to dev folder | |
run: | | |
mkdir -p dev | |
cp -r /tmp/quarto-site/* dev/ | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add dev/ | |
git commit -m "Deploy updated development version to gh-pages" | |
git push origin gh-pages |