Unify OperationResult API and enhance NewNoteController testability #307
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 HappyNotes Web | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.32.x' | |
| channel: 'stable' | |
| - name: Fetch Git Commit Hash | |
| id: get_commit | |
| run: | | |
| echo "commit_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| echo "build_date=$(date '+%Y-%b-%d')" >> $GITHUB_OUTPUT | |
| - name: Build web | |
| run: | | |
| cp .env.production .env | |
| COMMIT_HASH=${{ steps.get_commit.outputs.commit_hash }} | |
| BUILD_DATE=${{ steps.get_commit.outputs.build_date }} | |
| VERSION_INFO="$COMMIT_HASH ($BUILD_DATE)" | |
| sed -i "s/VERSION_PLACEHOLDER/$VERSION_INFO/" .env | |
| flutter config --enable-web | |
| flutter build web --release --base-href "/" | |
| - name: Create CNAME file | |
| run: echo 'happynotes.shukebeta.com' > ./build/web/CNAME | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.RELEASE_TOKEN }} | |
| publish_dir: ./build/web |