Skip to content

apply cicd (#5)

apply cicd (#5) #1

Workflow file for this run

name: CICD with EC2
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn build
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --delete --exclude=".env"
path: ./*
remote_path: /var/www/authorization-service
remote_host: 52.76.71.215
remote_user: ubuntu
remote_key: '${{ secrets.SSH_PRIVATE_KEY }}'