Update deploy.yml #42
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: Deploy Cynthia Mini Site to GitHub Pages | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| # Single deploy job since we're just deploying | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Fetch your site files from the repo | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Preconfigure pages | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| # Install Bun, the runtime that powers cynthiaweb-mini | |
| - name: Setup dependencies | |
| uses: jdx/mise-action@v2 | |
| with: | |
| install: true # [default: true] run `mise install` | |
| cache: true # [default: true] cache mise using GitHub's cache | |
| experimental: true # [default: false] enable experimental features | |
| # automatically write this mise.toml file | |
| mise_toml: | | |
| [tools] | |
| bun = "latest" | |
| pandoc = "latest" | |
| # Install the cynthiaweb-mini package version v1.1.7-test | |
| - name: Fetch Cynthia | |
| run: | | |
| bun install -g @cynthiaweb/cynthiaweb-mini@v1.1.7-test | |
| export PATH="/home/runner/.bun/bin:$PATH" | |
| # Fetch the scripts people use to install cynthiaweb-mini binaries | |
| - name: Fetch installer scripts to assets | |
| run: | | |
| curl -o ./assets/install.sh https://raw.githubusercontent.com/CynthiaWebsiteEngine/Mini/refs/heads/main/bininstallers/posix.sh | |
| curl -o ./assets/install.ps1 https://raw.githubusercontent.com/CynthiaWebsiteEngine/Mini/refs/heads/main/bininstallers/windows.ps1 | |
| # Let Cynthia Mini build the site | |
| - name: Cynthia \> Pregenerate | |
| run: cynthiaweb-mini pregenerate | |
| # Upload the generated site to the GitHub Pages artifact store | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Use the out folder as the artifact, which is the default output folder for cynthiaweb-mini | |
| path: "./out/" | |
| # Deploy the site to GitHub Pages | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |