Skip to content

feat : s3 git-actions 추가 #1

feat : s3 git-actions 추가

feat : s3 git-actions 추가 #1

Workflow file for this run

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: ⚙️ 환경변수를 설정합니다.
working-directory: ./
run: |
pwd
touch .env
echo VITE_EXCEL_DOWNLOAD_URL=${{ secrets.VITE_EXCEL_DOWNLOAD_URL }} >> .env
echo VITE_BACK_URL=${{ secrets.VITE_BACK_URL }} >> .env
cat .env
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm run build --if-present
- uses: awact/s3-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: './dist'
AWS_REGION: 'ap-northeast-2'
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}