Skip to content

Instantly share code, notes, and snippets.

@gausoft
Created May 27, 2023 10:28
Show Gist options
  • Select an option

  • Save gausoft/a211367abd7b7bf1ac151624c7beed6a to your computer and use it in GitHub Desktop.

Select an option

Save gausoft/a211367abd7b7bf1ac151624c7beed6a to your computer and use it in GitHub Desktop.

Revisions

  1. gausoft created this gist May 27, 2023.
    30 changes: 30 additions & 0 deletions gh-deploy.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    name: Deploy to GitHub Pages
    on:
    workflow_dispatch:
    push:
    branches: [main, develop]
    jobs:
    build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout
    uses: actions/checkout@v3

    - name: Setup Flutter
    uses: subosito/flutter-action@v2
    with:
    flutter-version: '3.10.0'
    channel: 'stable'

    - name: Install dependencies
    run: flutter packages get

    - name: Build web
    run: flutter build web --release --base-href '/repo_name/'

    - name: Deploy
    uses: peaceiris/actions-gh-pages@v3
    with:
    github_token: ${{ secrets.commit_secret }}
    publish_dir: ./build/web