fluffychat/.github/workflows/main_deploy.yaml

41 lines
1.1 KiB
YAML
Raw Normal View History

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
2023-07-14 10:00:01 +00:00
run: sudo apt-get update && sudo apt-get install nodejs -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:
2023-07-14 10:11:58 +00:00
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
2023-07-14 09:57:30 +00:00
publish_dir: ./public
2023-07-14 09:50:39 +00:00
publish_branch: gh-pages