Skip to content

Commit

Permalink
ci: Update GitHub Actions for conditional uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
yorifuji committed Apr 7, 2024
1 parent 1472ab0 commit e19acc3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/deliver-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ run-name: Deliver for GitHub Pages via ${{ (vars.RUNS_ON_SELF_HOSTED == null &&

on:
workflow_dispatch:
inputs:
upload:
description: 'Upload'
type: boolean
default: true
workflow_call:
inputs:
upload:
description: 'Upload'
type: boolean
default: true

permissions:
contents: read
Expand Down Expand Up @@ -39,10 +50,12 @@ jobs:
flutter build web --base-href /buzz_recipe_viewer/ --dart-define=FLAVOR=dev
- name: Upload artifact
if: ${{ inputs.upload }}
uses: actions/upload-pages-artifact@v3
with:
path: build/web

- name: Deploy to GitHub Pages
if: ${{ inputs.upload }}
id: deployment
uses: actions/deploy-pages@v4
16 changes: 15 additions & 1 deletion .github/workflows/scheduled-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,23 @@ jobs:
checks: write
secrets: inherit

build:
build-prod:
needs: check
uses: ./.github/workflows/deliver-prod.yml
secrets: inherit
with:
upload: false

build-stg:
needs: check
uses: ./.github/workflows/deliver-stg.yml
secrets: inherit
with:
upload: false

build-pages:
needs: check
uses: ./.github/workflows/deliver-pages.yml
secrets: inherit
with:
upload: false

0 comments on commit e19acc3

Please sign in to comment.