Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build
on:
pull_request:
branches: [main]
workflow_call:

env:
BART_VERSION: v0.10.0
Expand Down Expand Up @@ -51,3 +52,21 @@ jobs:
- name: Run npm tests
run: |
npm test

- name: Archive app artifacts
uses: actions/upload-artifact@v4
with:
name: app
# These are all of the paths referenced in spin.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned about the maintenance implications here but it's not a blocker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am as well... I took inspiration from another website/app (Finicky Whiskers) as I liked the flow of "build, save artifacts, deploy artifacts" but this site has many more files to track. Maybe all we need is a better pattern matching approach... eg something as simple as a "not node_modules" negation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#44

path: |
spin.toml
modules/*.wasm
content/**/*
templates/*
scripts/*
config/*
shortcodes/*
static/**/*
downloads/**/*
spin-redirect.json
spin-up-hub/dist/**/*
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Spin Docs

on:
push:
branches:
- 'main'

workflow_dispatch:

# Construct a concurrency group to be shared across workflow runs.
# The default behavior ensures that only one is running at a time, with
# all others queuing and thus not interrupting runs that are in-flight.
concurrency: ${{ github.workflow }}

permissions:
contents: read

jobs:
build:
uses: ./.github/workflows/build.yaml

deploy:
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: app
path: "${{ github.workspace }}"

- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Fermyon Cloud
run: spin cloud login --token "${{ secrets.FERMYON_CLOUD_TOKEN }}"

- name: Deploy to Fermyon Cloud
uses: fermyon/actions/spin/deploy@v1
with:
run_build: false
fermyon_token: "${{ secrets.FERMYON_CLOUD_TOKEN }}"