Skip to content

Commit

Permalink
Add pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-rapnicki-bixal committed Aug 17, 2023
1 parent 6874f72 commit d10dc03
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Deploy
on:
push:
branches:
- main
- dev
permissions:
contents: read
id-token: write
jobs:
build_push:
environment: ${{ github.head_ref || github.ref_name }}
runs-on: ubuntu-latest
container:
image: node:20-alpine3.17
env:
AWS_BUCKET: ${{ vars.AWS_BUCKET }}
name: Build & deploy
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_DEFAULT_REGION }}
- name: Install dependencies
run: |
apk update
apk add --no-cache aws-cli
- name: NPM build
run: |
npm install --legacy-peer-deps
npm run build
- name: Sync website to S3
run: |
cd dist
aws s3 sync . s3://${AWS_BUCKET} --delete

0 comments on commit d10dc03

Please sign in to comment.