Flutter pug upgrade for version: 3.24.1 #27
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
# Note: | |
# Make sure that the github pages is already set to Github Actions, otherwise the workflow will fail. | |
# | |
# Author: Shubham Gupta | |
# - GitHub: https://github.com/shubham-gupta-16/ | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
# pull_request: | |
# branches: | |
# - master | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
flutter_web_deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./example | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter pub get | |
- run: flutter build web --base-href /${{ github.event.repository.name }}/ | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: example/build/web | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |