Skip to content

Commit fac4c6d

Browse files
authored
Merge pull request #54 from DaleStudy/deploy-with-actions
deploy with github actions and require webhook signatures
2 parents 5b732a3 + b35e0c4 commit fac4c6d

8 files changed

Lines changed: 307 additions & 759 deletions

File tree

‎.all-contributorsrc‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"projectName": "github",
3+
"projectOwner": "DaleStudy",
4+
"commit": true,
5+
"repoType": "github",
6+
"commitConvention": "angular",
7+
"contributors": [
8+
{
9+
"login": "DaleSeo",
10+
"name": "Dale Seo",
11+
"avatar_url": "https://avatars.githubusercontent.com/u/5466341?v=4",
12+
"profile": "https://daleseo.com",
13+
"contributions": [
14+
"code"
15+
]
16+
},
17+
{
18+
"login": "soobing",
19+
"name": "Soobin Bak",
20+
"avatar_url": "https://avatars.githubusercontent.com/u/16860535?v=4",
21+
"profile": "https://soobing.github.io/",
22+
"contributions": [
23+
"code"
24+
]
25+
},
26+
{
27+
"login": "sounmind",
28+
"name": "Evan Suhyeong Lee",
29+
"avatar_url": "https://avatars.githubusercontent.com/u/37020415?v=4",
30+
"profile": "https://blog.evanshlee.com",
31+
"contributions": [
32+
"code"
33+
]
34+
},
35+
{
36+
"login": "devchanki",
37+
"name": "Gichan Kim",
38+
"avatar_url": "https://avatars.githubusercontent.com/u/31515116?v=4",
39+
"profile": "https://github.com/devchanki",
40+
"contributions": [
41+
"code"
42+
]
43+
},
44+
{
45+
"login": "lkhoony",
46+
"name": "KwangHun Lee",
47+
"avatar_url": "https://avatars.githubusercontent.com/u/66773320?v=4",
48+
"profile": "https://lkhoony.notion.site/Front-End-1a3f0e5e085480668ba0ebc54986f6bc",
49+
"contributions": [
50+
"code"
51+
]
52+
},
53+
{
54+
"login": "parkhojeong",
55+
"name": "Hojeong Park",
56+
"avatar_url": "https://avatars.githubusercontent.com/u/34734102?v=4",
57+
"profile": "https://github.com/parkhojeong",
58+
"contributions": [
59+
"code"
60+
]
61+
},
62+
{
63+
"login": "jylee2033",
64+
"name": "Jooyoung Julia Lee",
65+
"avatar_url": "https://avatars.githubusercontent.com/u/85793553?v=4",
66+
"profile": "https://github.com/jylee2033",
67+
"contributions": [
68+
"code"
69+
]
70+
}
71+
],
72+
"contributorsPerLine": 7,
73+
"linkToUsage": false,
74+
"files": [
75+
"README.md"
76+
]
77+
}

‎.github/workflows/deploy.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy 🚀
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: deploy-production
10+
cancel-in-progress: false
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- uses: actions/checkout@v7
19+
20+
- uses: oven-sh/setup-bun@v2
21+
22+
- run: bun install --frozen-lockfile
23+
24+
- run: bun run test
25+
26+
# PRIVATE_KEY 는 여러 줄짜리 PEM 이라 JSON 으로 쓴다
27+
- name: Write secrets file
28+
env:
29+
PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
30+
AI_GATEWAY_TOKEN: ${{ secrets.AI_GATEWAY_TOKEN }}
31+
INTERNAL_SECRET: ${{ secrets.INTERNAL_SECRET }}
32+
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
33+
run: |
34+
jq -n --arg private_key "$PRIVATE_KEY" --arg ai "$AI_GATEWAY_TOKEN" --arg internal "$INTERNAL_SECRET" --arg webhook "$WEBHOOK_SECRET" \
35+
'{PRIVATE_KEY: $private_key, AI_GATEWAY_TOKEN: $ai, INTERNAL_SECRET: $internal, WEBHOOK_SECRET: $webhook}' > "$RUNNER_TEMP/secrets.json"
36+
37+
- name: Deploy
38+
uses: cloudflare/wrangler-action@v4
39+
with:
40+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
packageManager: bun
42+
command: deploy --secrets-file ${{ runner.temp }}/secrets.json

0 commit comments

Comments
 (0)