Skip to content

Variable change

Variable change #3

Workflow file for this run

## Github Action: A simple `npm run build` command will build the app and sync it to an S3 bucket with aws cli.
name: Push
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: npm install, build, and test
run: |
npm install
npm run build
- name: Deploy to S3
shell: bash
run: |
aws s3 sync dist/ ${AWS_BUCKET} --delete
env:
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}