Skip to content

Merge pull request #11 from amandastecz/chore/cors #9

Merge pull request #11 from amandastecz/chore/cors

Merge pull request #11 from amandastecz/chore/cors #9

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Copy file via ssh key
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
source: "., !node_modules"
target: "~/rentapi"
- name: Update API
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
script: |
cd ~/rentapi
yarn
./node_modules/.bin/typeorm migration:run
pm2 restart rentx_api