2023-07-14 09:50:39 +00:00
|
|
|
name: Main Deploy Workflow
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2023-07-14 09:57:30 +00:00
|
|
|
env:
|
|
|
|
FLUTTER_VERSION: ${{ secrets.FLUTTER_VERSION }}
|
|
|
|
JAVA_VERSION: ${{ secrets.JAVA_VERSION }}
|
|
|
|
|
2023-07-14 09:50:39 +00:00
|
|
|
jobs:
|
2023-07-14 09:57:30 +00:00
|
|
|
deploy_web:
|
2023-07-14 09:50:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-07-14 09:57:30 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get update && sudo apt-get install node -y
|
2023-07-14 09:50:39 +00:00
|
|
|
- run: flutter pub get
|
|
|
|
- name: Prepare web
|
|
|
|
run: ./scripts/prepare-web.sh
|
|
|
|
- name: Build Release Web
|
|
|
|
run: flutter build web --release --verbose --source-maps
|
2023-07-14 09:57:30 +00:00
|
|
|
- name: Build Website
|
|
|
|
run: |
|
|
|
|
npx tailwindcss -o ./tailwind.css --minify
|
|
|
|
mv docs public
|
|
|
|
mv repo public || true
|
|
|
|
mv build/web/ public/web
|
2023-07-14 09:50:39 +00:00
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
personal_token: ${{ secrets.GITHUB_TOKEN }}
|
2023-07-14 09:57:30 +00:00
|
|
|
publish_dir: ./public
|
2023-07-14 09:50:39 +00:00
|
|
|
publish_branch: gh-pages
|