-
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.
- Loading branch information
Showing
1 changed file
with
46 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,46 @@ | ||
name: 'Build and Deploy Site' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: "Build Site and Upload to S3" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout Repo" | ||
id: checkout-repo | ||
uses: actions/[email protected] | ||
- name: "Setup & Install Bun" | ||
id: setup-bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.1.10 | ||
- name: "Cache Dependencies" | ||
id: setup-cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.bun | ||
key: bun-deps-${{ hashFiles('**/bun.lockb') }} | ||
restore-keys: bun-deps- | ||
- name: "Install Dependencies" | ||
id: setup-deps | ||
run: | | ||
bun install --frozen-lockfile | ||
- name: "Lint Site" | ||
id: lint-site | ||
run: | | ||
bun run lint | ||
- name: "Build Site" | ||
id: build-site | ||
run: | | ||
bun run build | ||
- name: "Upload to S3" | ||
id: upload-to-s3 | ||
run: | | ||
aws s3 sync ./dist s3://ethankr.me | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |