Skip to content

Commit

Permalink
ci: Add GitHub Pages deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yorifuji committed Apr 7, 2024
1 parent fd83d5d commit 1f08348
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 05 Deliver for GitHub Pages

run-name: Deliver for GitHub Pages via ${{ (vars.RUNS_ON_SELF_HOSTED == null && '(on GitHub-hosted)') || '(on self-hosted)' }}

on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false

jobs:
deploy-pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/configure-pages@v5

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ (vars.FLUTTER_VERSION != null && vars.FLUTTER_VERSION) || '' }}
channel: stable
cache: ${{ (vars.RUNS_ON_SELF_HOSTED == null && true) || false }}

- run: |
make build-runner
flutter pub get
flutter build web --base-href /buzz_recipe_viewer/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: build/web

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 1f08348

Please sign in to comment.