Skip to content

Commit 914309e

Browse files
committed
ci(.github): add deploy.yaml
Signed-off-by: Vaughn Dice <[email protected]>
1 parent 0dad83e commit 914309e

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/build.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,21 @@ jobs:
5151
- name: Run npm tests
5252
run: |
5353
npm test
54+
55+
- name: Archive app artifacts
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: app
59+
# These are all of the paths referenced in spin.toml
60+
path: |
61+
spin.toml
62+
modules/*.wasm
63+
content/**/*
64+
templates/*
65+
scripts/*
66+
config/*
67+
shortcodes/*
68+
static/**/*
69+
downloads/**/*
70+
spin-redirect.json
71+
spin-up-hub/dist/**/*

.github/workflows/deploy.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Spin Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
8+
workflow_dispatch:
9+
10+
# Construct a concurrency group to be shared across workflow runs.
11+
# The default behavior ensures that only one is running at a time, with
12+
# all others queuing and thus not interrupting runs that are in-flight.
13+
concurrency: ${{ github.workflow }}
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build:
20+
uses: ./.github/workflows/build.yaml
21+
22+
deploy:
23+
runs-on: ubuntu-24.04
24+
needs: build
25+
steps:
26+
- name: Download build artifacts
27+
uses: actions/download-artifact@v4
28+
with:
29+
name: app
30+
path: "${{ github.workspace }}"
31+
32+
- name: Setup Spin
33+
uses: fermyon/actions/spin/setup@v1
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Login to Fermyon Cloud
38+
run: spin cloud login --token "${{ secrets.FERMYON_CLOUD_TOKEN }}"
39+
40+
- name: Deploy to Fermyon Cloud
41+
uses: fermyon/actions/spin/deploy@v1
42+
with:
43+
run_build: false
44+
fermyon_token: "${{ secrets.FERMYON_CLOUD_TOKEN }}"

0 commit comments

Comments
 (0)