mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-04-28 16:48:30 -05:00
refactor: add Co-Labs live workflow and make all live deploys manual
- Add collabs-publish-live.yml for production deployment
- Update collabs-publish-dev.yml with consistent 🔮 icons
- Remove auto-trigger from kits-publish-live.yml (manual only)
- All live workflows now use workflow_dispatch only for controlled releases
This commit is contained in:
8
.github/workflows/collabs-publish-dev.yml
vendored
8
.github/workflows/collabs-publish-dev.yml
vendored
@@ -19,7 +19,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: '📦 Build & Deploy Co-Labs (Dev)'
|
||||
name: '🔮 Build & Deploy Co-Labs (Dev)'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -69,12 +69,12 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📦 Contents of ${{ vars.DEV_COLLABS_PATH }}/:"
|
||||
echo "🔮 Contents of ${{ vars.DEV_COLLABS_PATH }}/:"
|
||||
ls -la ${{ vars.DEV_COLLABS_PATH }}/ | head -10
|
||||
|
||||
echo "📦 Committing and pushing changes..."
|
||||
echo "🔮 Committing and pushing changes..."
|
||||
git add .
|
||||
git commit -m "📦 Deploy Co-Labs dev to /${{ vars.DEV_COLLABS_PATH }}/ from ${{ github.sha }}" --allow-empty || echo "🟡 Nothing to commit"
|
||||
git commit -m "🔮 Deploy Co-Labs dev to /${{ vars.DEV_COLLABS_PATH }}/ from ${{ github.sha }}" --allow-empty || echo "🟡 Nothing to commit"
|
||||
git push origin main
|
||||
|
||||
echo "✅ Co-Labs deployed to: https://harvard-edge.github.io/${{ vars.DEV_REPO }}/${{ vars.DEV_COLLABS_PATH }}/"
|
||||
|
||||
42
.github/workflows/collabs-publish-live.yml
vendored
Normal file
42
.github/workflows/collabs-publish-live.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: 🔮 Co-Labs Publish (Live)
|
||||
|
||||
# Builds and deploys Co-Labs site to mlsysbook.ai/collabs/
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
|
||||
concurrency:
|
||||
group: collabs-live-deploy
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
name: '🔮 Build & Deploy Co-Labs'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🔧 Setup Quarto
|
||||
uses: quarto-dev/quarto-actions/setup@v2
|
||||
|
||||
- name: 🔨 Build Co-Labs Site
|
||||
working-directory: collabs
|
||||
run: |
|
||||
quarto render
|
||||
touch _build/.nojekyll
|
||||
|
||||
- name: 🚀 Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./collabs/_build
|
||||
destination_dir: collabs
|
||||
publish_branch: gh-pages
|
||||
keep_files: true
|
||||
commit_message: '🔮 Deploy Co-Labs live - ${{ github.sha }}'
|
||||
4
.github/workflows/kits-publish-live.yml
vendored
4
.github/workflows/kits-publish-live.yml
vendored
@@ -4,10 +4,6 @@ name: 📦 Kits Publish (Live)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'kits/**'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
Reference in New Issue
Block a user