Skip to content

Update actions to include LFS files #17

Update actions to include LFS files

Update actions to include LFS files #17

Workflow file for this run

name: Deploy to Container
on:
push:
branches: [mainline]
paths-ignore:
- "**.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- uses: jetli/[email protected]
- name: Cache Cargo registry
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache build artifacts
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-artifacts-${{ hashFiles('**/Cargo.lock') }}
- name: Lint
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings --no-deps
- name: Test
run: cargo test
- name: Build
run: cargo build --release
- name: Webpack
run: trunk build --release website/index.html
- name: Upload WASM
uses: actions/upload-artifact@v4
with:
name: dist
path: website/dist
deploy-website:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
environment:
name: us-east-1
needs: build
steps:
- name: Download WASM
uses: actions/download-artifact@v4
with:
name: dist
- name: Upload to S3
uses: reggionick/s3-deploy@v4
with:
folder: dist
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ vars.AWS_DEFAULT_REGION }}
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: / *
private: true
delete-removed: true