-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (37 loc) · 1.21 KB
/
web-staging.yml
File metadata and controls
45 lines (37 loc) · 1.21 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
name: Deploy web — staging
on:
push:
branches: [main]
workflow_dispatch:
# Cancel any in-progress staging deploy for the same ref
concurrency:
group: web-staging-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Build & deploy to staging
runs-on: ubuntu-latest
environment:
name: web-staging
url: https://deepgram-cli-staging.netlify.app
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: npm
cache-dependency-path: web/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: web
- name: Build
run: npm run build
working-directory: web
env:
SITE_URL: ${{ vars.STAGING_SITE_URL || 'https://cli.staging.deepgram.com' }}
- name: Deploy to Netlify (staging)
run: npx netlify-cli deploy --dir dist --prod --no-build
working-directory: web
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_STAGING_SITE_ID }}