chore: update cache action #4
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: Catalog Web CI | |
on: | |
push: | |
paths: | |
- 'packages/catalog/**' | |
jobs: | |
check-formatting: | |
uses: ./.github/workflows/shared-workflow.yaml | |
with: | |
package-name: catalog | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.3' | |
cache: true | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.pub-cache | |
packages/catalog/.dart_tool | |
key: ${{ runner.os }}-pub-${{ hashFiles('packages/catalog/pubspec.yaml') }} | |
- name: Enable melos | |
run: dart pub global activate melos | |
- name: Get packages | |
run: melos bootstrap | |
- name: Generate Files | |
run: melos generate | |
- name: Build Web | |
run: flutter build web --wasm | |
working-directory: packages/catalog | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./packages/catalog/build/web |