From ee8dcca44bf657f9a3d51905358790ade265ab9e Mon Sep 17 00:00:00 2001 From: Jiwon <89859244+7iw8n@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:44:33 +0900 Subject: [PATCH] Third-Update deploy.yml --- .github/workflows/deploy.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3e60f12..ee2805d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,24 +2,34 @@ name: Auto Deploy after push on: push: - branches: ["main"] + branches: + - main jobs: - build-and-deploy: + build: runs-on: ubuntu-18.04 steps: - - name: git checkout - uses: actions/checkout@v3 + - name: Checkout source code. + uses: actions/checkout@main - - name: npm install + - name: Cache node modules + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-build- + ${{ runner.OS }}- + + - name: Install Dependencies run: npm install - - name: npm build + - name: Build run: npm run build env: CI: false - - name: deploy s3 + - name: Deploy env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}