Skip to content

Commit

Permalink
apply cicd (#4)
Browse files Browse the repository at this point in the history
Co-authored-by: NHT <[email protected]>
  • Loading branch information
nfesta2023 and hoangtuan910 authored Jan 21, 2024
1 parent fe2e6c0 commit 283220a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/CICDwithEC2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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/user-service
remote_host: 52.76.71.215
remote_user: ubuntu
remote_key: '${{ secrets.SSH_PRIVATE_KEY }}'
33 changes: 0 additions & 33 deletions .github/workflows/node.js.yml

This file was deleted.

0 comments on commit 283220a

Please sign in to comment.