-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.75 KB
/
staging.yml
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
name: Website Staging Deploy
on:
push:
branches:
- staging # or the branch you want to deploy from
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: website
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20" # Use the Node.js version compatible with your project
- name: Install pnpm
run: npm install -g pnpm
- name: Install Doppler CLI
run: |
(curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sudo sh
- name: Set up Doppler
run: doppler configure set token ${{ secrets.WEB_DOPPLER_TOKEN }}
- name: Fetch secrets from Doppler and boot
run: doppler run -- npm run boot
env:
DOPPLER_TOKEN: ${{ secrets.WEB_DOPPLER_TOKEN }}
- name: Clean up build output
working-directory: ./apps/website/.next
run: |
rm -rf cache
- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.WEB_CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.WEB_CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.WEB_CLOUDFLARE_PROJECT_NAME }}
run: |
npx wrangler pages deploy ./apps/website/out --project-name=$CLOUDFLARE_PROJECT_NAME --branch=main