updated editor tokens to be more understandable #39
This file contains hidden or 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
| name: Deploy Web To GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| env: | |
| FLUTTER_VERSION: '3.41.2' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Configure Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build web | |
| run: | | |
| flutter pub get | |
| flutter build web --wasm --release --base-href "/${{ github.event.repository.name }}/" | |
| - name: Write Pages runtime config | |
| run: | | |
| cat > build/web/config.json <<'EOF' | |
| { | |
| "schemaVersion": 1, | |
| "defaultServerUrl": null, | |
| "discoveryProxyUrl": null, | |
| "enableWebRtcScan": true, | |
| "brandingName": "Moonfin", | |
| "pluginMode": false, | |
| "forcedServerUrl": null | |
| } | |
| EOF | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: build/web | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |