Bump the pub-dependencies group in /packages/google_fonts with 1 upda… #81
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
# Builds and deploys example web apps for each of the packages to GitHub Pages | |
name: Deploy examples to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/**' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Determine which packages have example apps | |
find-example-apps: | |
runs-on: ubuntu-latest | |
outputs: | |
example-apps: ${{ steps.find-example-apps.outputs.example-apps }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- run: man ls | |
- name: Find example apps | |
id: find-example-apps | |
# Outputs a JSON list of packages with example apps, e.g. ["dynamic_color", "google_fonts"] | |
run: | | |
echo "::set-output name=example-apps::$(ls -d */example | xargs dirname | jq -R -s -c 'split("\n")[:-1]')" | |
working-directory: packages | |
# Build example web apps job | |
build: | |
needs: find-example-apps | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
strategy: | |
matrix: | |
package: ${{ fromJson(needs.find-example-apps.outputs.example-apps) }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0 | |
with: | |
channel: 'stable' | |
- name: Build Flutter web app | |
run: flutter build web -v --release --output /tmp/${{ matrix.package }} --base-href /${{ github.event.repository.name }}/${{ matrix.package }}/ | |
working-directory: packages/${{ matrix.package }}/example | |
- name: Upload web build temporarily | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: ${{ matrix.package }} | |
path: /tmp/${{ matrix.package }} | |
retention-days: 1 | |
# Upload pages artifact to pages job | |
upload-to-pages: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all web builds | |
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3 | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
with: | |
path: '.' | |
# Deploy job | |
deploy-pages: | |
needs: upload-to-pages | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4 |