Skip to content

Merge pull request #199 from webduinoio:release/8093 #170

Merge pull request #199 from webduinoio:release/8093

Merge pull request #199 from webduinoio:release/8093 #170

name: Deploy to S3 Next
on:
push:
branches:
- next
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_S3_BUCKET_NAME: webduino-chat
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".tool-versions"
- name: Cache npm packages
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-
- name: Install Dependencies
run: npm ci
- name: Build Application
run: npm run build:staging
- uses: jakejarvis/s3-sync-action@master
name: Upload App to S3 Bucket
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ env.AWS_S3_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "ap-northeast-2"
SOURCE_DIR: "dist"
DEST_DIR: "next" # TODO: 改成 `tutor-stg`