-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Github Actions build-and-deploy action
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: build-and-deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-bangerify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checking out code | ||
uses: actions/checkout@v3 | ||
- name: Installing Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" | ||
- name: Installing dependencies | ||
run: npm install | ||
- name: Building Bangerify | ||
run: npm run build | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-central-1 | ||
|
||
- name: Deploy static website to S3 bucket | ||
run: aws s3 sync ./build/ s3://bangerify.com --delete |