-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.26 KB
/
release.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
name: Release
on:
push:
tags:
# Semver-like tags "v1.0.0"
- "v[0-9]+.[0-9]+.[0-9]+"
concurrency: production_deployment
jobs:
Shared:
uses: ./.github/workflows/install-lint.yml
Deploy:
needs:
- Shared
runs-on: ubuntu-latest
environment:
name: Production
url: https://iiro.fi
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/cache@v3
id: cache-node_modules
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Pull Vercel Environment Information
run: npx vercel pull --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: npx vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
NEXT_TELEMETRY_DISABLED: "1"
- name: Deploy Project Artifacts to Vercel
run: npx vercel --prod --prebuilt --archive=tgz --token=${{ secrets.VERCEL_TOKEN }}