Skip to content

Merge pull request #198 from UTDallasEPICS/commentDates #121

Merge pull request #198 from UTDallasEPICS/commentDates

Merge pull request #198 from UTDallasEPICS/commentDates #121

Workflow file for this run

on:
push:
branches:
- stage
name: Update EC2
jobs:
update:
name: Prod - SSH Login, Pull, Reload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/[email protected]
with:
node-version: "19.x"
- run: npm install
- run: npx prisma generate
- run: npm run build
- name: copy file via ssh password
uses: appleboy/[email protected]
with:
host: ec2-52-34-213-210.us-west-2.compute.amazonaws.com
username: ubuntu
key: ${{ secrets.CARSONS_AWS_API_PRIVATE_KEY }}
source: ./.output
target: ~/carsons-village-stage
overwrite: true
tar_dereference: true
- name: Execute
uses: appleboy/[email protected]
with:
script: |
cd carsons-village-stage
git checkout stage
git stash
git pull
npm install
cp .env ./.output/server/.env
npx prisma migrate deploy
pm2 restart all
host: ec2-52-34-213-210.us-west-2.compute.amazonaws.com
username: ubuntu
key: ${{ secrets.CARSONS_AWS_API_PRIVATE_KEY }}