Skip to content

Commit

Permalink
Create github action for deploying client to vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
oddgrd committed Oct 18, 2021
1 parent 67f78a1 commit f1a92d0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
---
name: 'testAndDeploy'
name: 'deploy API'

on:
push:
branches:
- master
paths:
- 'server/**'
- '.github/workflows/testAndDeploy.yaml'
- '.github/workflows/deployAPI.yaml'

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./server

services:
postgres:
image: postgres
Expand All @@ -36,7 +38,7 @@ jobs:
- name: Clone repo
uses: actions/checkout@v2

- name: Setup Node and cache yarn dependencies
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'
Expand All @@ -55,6 +57,7 @@ jobs:
deploy:
needs: test
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v2
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/deployClient.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 'deploy client'

on:
push:
branches:
- master
paths:
- 'client/**'
- '.github/workflows/deployClient.yaml'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-args: '--prod'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
working-directory: ./client

0 comments on commit f1a92d0

Please sign in to comment.