Skip to content

Squashed commit of the following: #207

Squashed commit of the following:

Squashed commit of the following: #207

Workflow file for this run

name: Deploy to S3
on:
push:
branches:
- main # main 브랜치에 push가 발생할 때마다 실행
- develop # develop 브랜치에 push가 발생할 때마다 실행
jobs:
deploy-to-main:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: gentoo-sdk-prod # 여기에 S3 버킷 이름 입력
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
AWS_REGION: ap-northeast-2 # 예: us-west-2
SOURCE_DIR: '' # 업로드할 파일 경로 (예: dist)
deploy-to-dev:
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: gentoo-sdk-dev # 여기에 S3 버킷 이름 입력
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ap-northeast-2 # 예: us-west-2
SOURCE_DIR: '' # 업로드할 파일 경로 (예: dist)