Skip to content

Merge pull request #29 from ppeters0502/100days_eight #49

Merge pull request #29 from ppeters0502/100days_eight

Merge pull request #29 from ppeters0502/100days_eight #49

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Production Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: NPM Install
run: |
npm install --no-audit
- name: Production Build
run: |
CI="" npm run build
- name: Deploy to S3
uses: kersvers/[email protected]
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_PRODUCTION_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: 'build'