Skip to content

Commit

Permalink
Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
AshMartian committed Nov 24, 2023
1 parent 8983c7c commit d5f2f5d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## 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: 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
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 }}

0 comments on commit d5f2f5d

Please sign in to comment.