-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 2.02 KB
/
crew-deploy-development.yml
File metadata and controls
67 lines (57 loc) · 2.02 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
name: Crew - Development Deploy
on:
push:
branches: [develop]
paths:
- 'apps/crew/**'
- 'packages/**'
- 'package.json'
- 'yarn.lock'
pull_request:
workflow_dispatch:
jobs:
deploy:
environment: development
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Enable Corepack
run: |
corepack enable
corepack prepare yarn@4.1.1 --activate
yarn -v
- name: Cache Yarn
uses: actions/cache@v4
id: yarn-cache
with:
path: ~/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Packages
run: yarn install --immutable
- name: Set .env
run: |
echo "${{ secrets.PROJECT_ENV }}" > apps/crew/.env.local
echo "NEXT_PUBLIC_KAKAO_TALK_PLUGIN_KEY=${{ vars.NEXT_PUBLIC_KAKAO_TALK_PLUGIN_KEY }}" >> apps/crew/.env.local
echo "NEXT_PUBLIC_SENTRY_DSN=${{ vars.NEXT_PUBLIC_SENTRY_DSN }}" >> apps/crew/.env.local
echo "NEXT_PUBLIC_AMPLITUDE_API_KEY=${{ vars.NEXT_PUBLIC_AMPLITUDE_API_KEY }}" >> apps/crew/.env.local
echo "NEXT_PUBLIC_APP_ENV=${{ vars.NEXT_PUBLIC_APP_ENV }}" >> apps/crew/.env
- name: Build
run: yarn build:crew
- name: Move artifacts into dist folder
run: cd apps/crew && mkdir group && mv out/* group/ && mv group out
- name: Deploy
run: yarn run wrangler pages deploy "apps/crew/out" --project-name "${{ secrets.CLOUDFLARE_PAGES_CREW_PROJECT_NAME }}" --commit-message "${{ github.sha }}" --branch=main
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}