52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Deploy to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
cache: true
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Run build_runner
|
|
run: flutter pub run build_runner build --delete-conflicting-outputs
|
|
|
|
- name: Run tests
|
|
run: flutter test
|
|
|
|
- name: Build web
|
|
run: flutter build web --base-href /pdf_signature/ --release -O4 --wasm
|
|
|
|
- name: Deploy to gh-pages branch
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./build/web
|
|
publish_branch: gh-pages
|
|
exclude_assets: 'pr-preview/**'
|
|
|