chore: cargo fmt #38
This file contains hidden or 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 & Deploy Frontend | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'frontend/**' | |
| - 'Cargo.*' | |
| - '.github/workflows/build-publish-frontend.yml' | |
| jobs: | |
| app: | |
| name: Build and deploy frontend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| targets: wasm32-unknown-unknown | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "lts/Jod" | |
| - uses: jetli/trunk-action@v0.1.0 | |
| with: | |
| version: 'latest' | |
| - name: Install npm dependencies | |
| run: npm install | |
| working-directory: frontend | |
| - name: Build tailwind | |
| run: npm run build:tailwind -- --minify | |
| working-directory: frontend | |
| - name: Build frontend | |
| run: trunk build --release | |
| env: | |
| BACKEND_URL: https://api.play.yew.rs/api | |
| working-directory: frontend | |
| - name: Deploy to Firebase | |
| uses: FirebaseExtended/action-hosting-deploy@v0 | |
| with: | |
| repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
| firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_YEW_RS }}' | |
| channelId: live | |
| projectId: yew-rs | |
| env: | |
| FIREBASE_CLI_PREVIEWS: hostingchannels |