fix: aws region #3
Workflow file for this run
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
name: build and sync to S3 | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
workflow_dispatch: | ||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "sync-to-s3-${{ github.ref }}" | ||
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 | ||
steps: | ||
- name: Checkout code | ||
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: ${{ AWS_REGION }} | ||
Check failure on line 25 in .github/workflows/s3-sync.yml
|
||
- name: Install rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/bin | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- 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 | ||
run: | | ||
cargo fmt --check | ||
cargo clippy --all-features --no-deps | ||
cargo test | ||
- name: Build artifact | ||
run: | | ||
trunk build --release --public-url ${{ github.event.repository.name }} | ||
- name: Sync S3 bucket | ||
run: | | ||
aws s3 sync ./dist s3://${S3_BUCKET_NAME} --delete | ||
- name: GitHub Release | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
draft: false | ||
prerelease: false | ||
tag_name: ${{ github.ref_name }} | ||
release_name: v${{ github.ref_name }} | ||
body_path: CHANGELOG.md |