This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (54 loc) · 1.71 KB
/
development.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
53
54
55
56
name: Development
#on:
# push:
# branches: [ develop ]
jobs:
snyk:
name: Snyk Analysis
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node and npm
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Snyk vulnerability scan
run: |
npm install --global snyk
snyk auth $SNYK_TOKEN
snyk monitor --dev --fail-on=patchable --project-name=@github-action/resume-dev
snyk test --dev --fail-on=patchable --project-name=@github-action/resume-dev
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
release-develop:
name: Deploy Development
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node and npm
uses: actions/setup-node@v1
with:
node-version: '12'
registry-url: 'https://npm.pkg.github.com'
- name: Build application for dev
run: |
npm install
npm run build:dev
- name: Deploy to vercel dev project
run: |
npm install --global vercel
mkdir .vercel
echo "{\"orgId\":\"$VERCEL_ORGID\",\"projectId\":\"$VERCEL_PROJECTID_DEV\"}" > .vercel/project.json
vercel --token $VERCEL_TOKEN --prod --confirm
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORGID: ${{ secrets.VERCEL_ORGID }}
VERCEL_PROJECTID_DEV: ${{ secrets.VERCEL_PROJECTID_DEV }}