Deploy to GitHub Pages #8
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 to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| # todo | |
| # test: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./app-mobile/flutter_application | |
| # needs: test | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v6 | |
| - name: Set Up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Download Dependencies | |
| run: flutter pub get | |
| - name: Build for Web Platform | |
| run: flutter build web --release --base-href /ROQuiz/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./app-mobile/flutter_application/build/web | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| defaults: | |
| run: | |
| working-directory: ./app-mobile/flutter_application | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |