forked from wasp-lang/wasp
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (72 loc) · 2.42 KB
/
release-examples-deploy.yaml
File metadata and controls
87 lines (72 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "Release - Deploy examples"
on:
# Allow calling this workflow from other workflows
workflow_call:
inputs:
version:
type: string
description: "Wasp version to use for deployment (e.g., 0.18.0), defaults to latest"
required: false
default: "" # We are relying on the install script treating the empty string as the latest version
secrets:
FLY_GITHUB_PRODUCTION_TOKEN:
description: "Fly API token for deploying apps"
required: true
# Allow calling this workflow manually from the GitHub UI
workflow_dispatch:
inputs:
version:
description: "Wasp version to use for deployment (e.g., 0.18.0), defaults to latest"
required: false
default: "" # We are relying on the install script treating the empty string as the latest version
concurrency:
group: "release-examples-deploy"
cancel-in-progress: true
env:
WASP_TELEMETRY_DISABLE: 1
jobs:
deploy:
strategy:
matrix:
app-dir:
- examples/waspello
- examples/waspleau
- examples/websockets-realtime-voting
- examples/ask-the-documents
- examples/kitchen-sink
name: Deploy ${{ matrix.app-dir }}
runs-on: ubuntu-latest
environment:
name: ${{ matrix.app-dir }}-production
url: ${{ steps.app-info.outputs.url }}
steps:
- name: Install Wasp
run: |
curl -sSfL https://get.wasp.sh/installer.sh | sh -s -- -v "${{ inputs.version }}"
- name: Install Fly CLI
uses: superfly/flyctl-actions/setup-flyctl@v1
- name: Checkout repo
uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
cache: "npm"
node-version: "22"
- name: Setup Wasp TS Config (if needed)
working-directory: ${{ matrix.app-dir }}
run: |
if [ -f *.wasp.ts ]; then
wasp ts-setup
fi
- name: Deploy
working-directory: ${{ matrix.app-dir }}
run: |
wasp deploy fly deploy --org wasp
env:
FLY_API_TOKEN: ${{ secrets.FLY_GITHUB_PRODUCTION_TOKEN }}
- name: Get deployed app info
id: app-info
working-directory: ${{ matrix.app-dir }}
run: |
echo "url=https://$(flyctl status -c fly-client.toml --json | jq -r .Hostname)" >> $GITHUB_OUTPUT
env:
FLY_API_TOKEN: ${{ secrets.FLY_GITHUB_PRODUCTION_TOKEN }}