Sunstone::Docs::D_DEPLOYMENT::CiCd
Continuous Integration & GitHub Pages
Executive Summary & Key Topics
| Topic | Method / Anchor | Description |
|---|---|---|
| Automated Deployment Workflow | .topic_01_github_actions |
Publishing presentations to GitHub Pages on git push. |
Class methods
topic_01_github_actions
Automated Deployment Workflow: Publishing presentations to GitHub Pages on git push.
Every presentation scaffolded with sunstone new includes .github/workflows/deploy.yml:
name: Deploy Presentation to GitHub Pages
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
runs-on: ubuntu-latest
steps:
- name: Checkout Presentation Source
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install Sunstone CLI
run: |
git clone https://github.com/sol-vin/sunstone.git /tmp/sunstone
cd /tmp/sunstone && shards install && crystal build src/sunstone.cr -o /usr/local/bin/sunstone --release
- name: Build Presentation
run: |
sunstone build --out dist
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4