Skip to content

Fix workflow permissions for GitHub Pages #7

Fix workflow permissions for GitHub Pages

Fix workflow permissions for GitHub Pages #7

Workflow file for this run

name: Build and Deploy Flutter Web
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
- name: Flutter Pub Get
run: flutter pub get
- name: Build Flutter Web
run: flutter build web
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: build/web
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
pages: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4