refactor: Make the source code in software/index.qmd a little simpler… #128
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
# Basic workflow | |
name: Publish | |
# Controls when the action will run | |
# Workflow begins with push or PR events | |
# Focuses on the master branch only | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Jobs for setup, rendering, and publishing | |
# for the web site, using Python, Poetry, | |
# and the Quarto publishing system | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Repository | |
- name: Check out Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
# Install Quarto | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.5.55 | |
# Install Python | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
# Install Poetry | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2.0.0 | |
with: | |
poetry-version: 1.8.3 | |
# Setup the Virtual Environment | |
- name: Setup Virtual Environment | |
run: | | |
poetry install | |
# Render and Publish the Site | |
# Note that this uses Quarto to | |
# directly publish the site, which | |
# means that you do not use Netlify | |
# build minutes. This is great! Yet, | |
# it also means that you do not get | |
# a Netlify preview build for PRs. | |
- name: Render and Publish | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
PYDEVD_DISABLE_FILE_VALIDATION: 1 | |
run: | | |
python --version | |
poetry --version | |
quarto --version | |
poetry run quarto check | |
poetry run python scripts/publish-site.py --stage all | |
poetry run python scripts/publish-site.py --stage render --render-file index.qmd | |
poetry run python scripts/publish-site.py --stage post-render | |
poetry run python scripts/publish-site.py --stage netlify | |
# Old version: | |
# # generate the markdown files from the bibliography for: | |
# # 1) research papers | |
# # 1a) conference papers | |
# # 1b) journal papers | |
# # 2) research presentations | |
# poetry run python scripts/parse-bibliography.py --force | |
# # directly publish a version of the site to Netlify, using | |
# # the optimize profile that will perform minification | |
# # poetry run quarto render --profile optimize | |
# poetry run quarto publish netlify --profile optimize |