Merge pull request #106 from UTDallasEPICS/stage #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
name: Update Prod | |
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 | |
overwrite: true | |
- name: Execute | |
uses: appleboy/[email protected] | |
with: | |
script: | | |
cd carsons-village | |
git checkout main | |
git pull | |
npm install | |
cp .env ./.output/server/.env | |
npx prisma migrate deploy | |
pm2 restart all | |
host: pages.carsonsvillage.org | |
username: ubuntu | |
key: ${{ secrets.CARSONS_AWS_API_PRIVATE_KEY }} |