mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-30 09:38:38 -05:00
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: '📦 Kits · 🚀 Publish (Live)'
|
|
|
|
# Builds and deploys Hardware Kits site (with PDF) to mlsysbook.ai/kits/
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
actions: read
|
|
|
|
concurrency:
|
|
group: gh-pages-deploy
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
# Build PDF first
|
|
build-pdf:
|
|
name: '📚 Build PDF'
|
|
uses: ./.github/workflows/kits-build-pdfs.yml
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
|
|
build-and-deploy:
|
|
name: '🔧 Build & Deploy Kits'
|
|
runs-on: ubuntu-latest
|
|
needs: [build-pdf]
|
|
|
|
steps:
|
|
- name: 📥 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🔧 Setup Quarto
|
|
uses: quarto-dev/quarto-actions/setup@v2
|
|
|
|
- name: 🔨 Build Kits Site
|
|
working-directory: kits
|
|
run: |
|
|
quarto render
|
|
touch _build/.nojekyll
|
|
|
|
- name: 📥 Download PDF Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: Kits-PDF
|
|
path: kits/_build/assets/downloads/
|
|
|
|
- name: 📋 Verify PDF
|
|
run: |
|
|
echo "📋 PDF artifacts:"
|
|
ls -la kits/_build/assets/downloads/
|
|
echo ""
|
|
echo "📊 PDF file size:"
|
|
du -h kits/_build/assets/downloads/*.pdf
|
|
|
|
- name: 🚀 Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./kits/_build
|
|
destination_dir: kits
|
|
publish_branch: gh-pages
|
|
keep_files: true
|
|
commit_message: '🔧 Deploy Kits live (with PDF) - ${{ github.sha }}'
|