Skip to content

Commit

Permalink
chore: parameterize s3 region
Browse files Browse the repository at this point in the history
  • Loading branch information
jac18281828 committed Oct 20, 2024
1 parent 6e2d92e commit a5ff7e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/s3-sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build and sync to S3
name: Build and Sync to S3
on:
push:
tags:
Expand All @@ -10,6 +10,7 @@ concurrency:
cancel-in-progress: true
env:
S3_BUCKET_NAME: "emom-timer-us-east-2-504242000181"
AWS_REGION: "us-east-2"
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -21,8 +22,8 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-2'
- name: Install rust
aws-region: ${{ env.AWS_REGION }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -34,22 +35,22 @@ jobs:
~/.cargo/registry
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install trunk and wasm
- name: Install Trunk and Wasm
run: |
rustup component add rustfmt clippy
rustup target add wasm32-unknown-unknown
cargo install trunk
- name: Rust build and check
- name: Rust Build and Check
run: |
cargo fmt --check
cargo clippy --all-features --no-deps
cargo test
- name: Build artifact
- name: Build Artifact
run: |
trunk build --release --public-url ${{ github.event.repository.name }}
- name: Sync S3 bucket
trunk build --release --public-url http://${{ env.S3_BUCKET_NAME }}.s3-website.${{ env.AWS_REGION }}.amazonaws.com
- name: Sync S3 Bucket
run: |
aws s3 sync ./dist s3://${S3_BUCKET_NAME} --delete
aws s3 sync ./dist s3://${S3_BUCKET_NAME} --delete --region ${{ env.AWS_REGION }}
- name: GitHub Release
uses: actions/[email protected]
env:
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# EMOM Timer

[![Build Dev Image CI](https://github.com/jac18281828/emomtimer/actions/workflows/ci-image.yml/badge.svg)](https://github.com/jac18281828/emomtimer/actions/workflows/ci-image.yml)
[![Build and Sync to S3](https://github.com/jac18281828/emomtimer/actions/workflows/s3-sync.yml/badge.svg)](https://github.com/jac18281828/emomtimer/actions/workflows/s3-sync.yml)

[![EMOM Timer](timer.png)](http://emom-timer-us-east-2-504242000181.s3-website.us-east-2.amazonaws.com)

# Customizable timer for your workout!

This is a customizable timer written with Rust and Yew.
This is a customizable timer written with Rust and Yew.

[Rust Doc](https://jac18281828.github.io/emomtimer/)

# Introduction

Expand Down

0 comments on commit a5ff7e3

Please sign in to comment.