Skip to content

Commit a20e5ad

Browse files
committed
ref: move ci
1 parent 7865dc0 commit a20e5ad

2 files changed

Lines changed: 41 additions & 17 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Deploy
22

33
on:
44
push:
5-
tags:
6-
- "v*"
75
branches:
86
- main
97

@@ -12,27 +10,14 @@ concurrency:
1210
cancel-in-progress: true
1311

1412
jobs:
15-
detect-deploy:
16-
runs-on: ubuntu-latest
17-
outputs:
18-
stack: ${{ steps.detect.outputs.stack }}
19-
steps:
20-
- id: detect
21-
run: |
22-
if [[ "${{ github.ref_type }}" == "tag" && "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
23-
echo "stack=production" >> $GITHUB_OUTPUT
24-
else
25-
echo "stack=dev" >> $GITHUB_OUTPUT
26-
fi
27-
2813
deploy:
29-
needs: detect-deploy
3014
runs-on: ubuntu-latest
3115
environment: cloudflare
3216
timeout-minutes: 20
3317
permissions:
3418
contents: read
3519
id-token: write
20+
3621
steps:
3722
- uses: actions/checkout@v6
3823
with:
@@ -54,7 +39,7 @@ jobs:
5439
with:
5540
command: up
5641
work-dir: infra
57-
stack-name: ${{ needs.detect-deploy.outputs.stack }}
42+
stack-name: dev
5843
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
5944
env:
6045
AWS_REGION: auto

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,47 @@ permissions:
1010
contents: write
1111

1212
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
environment: cloudflare
16+
timeout-minutes: 20
17+
permissions:
18+
contents: read
19+
id-token: write
20+
21+
steps:
22+
- uses: actions/checkout@v6
23+
with:
24+
ref: ${{ github.sha }}
25+
26+
- uses: actions/setup-node@v6
27+
with:
28+
node-version-file: ".node-version"
29+
30+
- uses: oven-sh/setup-bun@v2
31+
with:
32+
bun-version: latest
33+
34+
- name: Install dependencies
35+
run: bun install --frozen-lockfile
36+
37+
- name: Applying infrastructure 🚀
38+
uses: pulumi/actions@v6
39+
with:
40+
command: up
41+
work-dir: infra
42+
stack-name: production
43+
cloud-url: ${{ secrets.PULUMI_BACKEND_URL }}
44+
env:
45+
AWS_REGION: auto
46+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
47+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
48+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
49+
PULUMI_CONFIG_PASSPHRASE: ${{ secrets.PULUMI_CONFIG_PASSPHRASE }}
50+
1351
release:
1452
name: Create Release
53+
needs: deploy
1554
runs-on: ubuntu-latest
1655

1756
steps:

0 commit comments

Comments
 (0)