Merge pull request #193 from webduinoio/bug/7652 #167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |