update: clarify blog post subject requirements to include tidy approa… #14
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 Blog | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Check & Preview Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Install R (minimal) | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Render site (with code freeze) | |
run: quarto check && quarto render | |
- name: Install xmllint | |
run: sudo apt-get update && sudo apt-get install -y libxml2-utils | |
- name: Validate RSS feed | |
run: | | |
if [ -f _site/index.xml ]; then | |
xmllint --noout _site/index.xml | |
else | |
echo "RSS feed not found!" && exit 1 | |
fi | |
deploy: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
name: Publish to GitHub Pages | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Render site | |
run: | | |
quarto render | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./_site | |
force_orphan: true |