From a86c98cb393a188ea039c519a316442e2965c213 Mon Sep 17 00:00:00 2001 From: ChoiWonYu Date: Wed, 26 Jul 2023 20:45:02 +0900 Subject: [PATCH] feat: CI git-action script --- .github/workflows/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df21d8f..ac2a4d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,10 +2,21 @@ name: CI/CD on: push: - branches: [master] - jobs: + CI: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + - run: yarn install + - run: npx @nestjs/cli build + - run: yarn run lint build: + needs: CI + if: github.ref == 'refs/heads/master' name: Build Image runs-on: ubuntu-latest @@ -31,6 +42,7 @@ jobs: docker push ${{secrets.ECR_IMAGE_URI}}:latest deploy: needs: build + if: github.ref == 'refs/heads/master' name: CD runs-on: self-hosted