-
-
Notifications
You must be signed in to change notification settings - Fork 35
47 lines (38 loc) · 1.25 KB
/
deploy.yml
File metadata and controls
47 lines (38 loc) · 1.25 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
name: Deploy app to Live
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
workflow_dispatch:
permissions:
contents: read
jobs:
dev_deploy:
name: Build and Deploy to Production
if: ${{ github.repository == 'sws2apps/organized-app' && github.ref == 'refs/heads/main' }}
environment:
name: Live (organized-app.com)
url: https://organized-app.com
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout for release preparation
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: main
persist-credentials: false
- name: Use Node.js LTS version
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
with:
node-version: lts/Krypton
- name: Install package dependencies
run: npm ci
- name: Run Semantic Release to version and build App
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Deploy project to Vercel
run: vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}