39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Main Deploy Workflow
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- pangea-merge
|
|
|
|
jobs:
|
|
deploy_web:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- run: echo "$WEB_APP_ENV" > .env
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
cache: true
|
|
- name: Install dependencies
|
|
run: sudo apt-get update && sudo apt-get install nodejs -y
|
|
- run: flutter pub get
|
|
- name: Prepare web
|
|
run: ./scripts/prepare-web.sh
|
|
- name: Build Release Web
|
|
run: flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps --base-href "/web/"
|
|
- name: Build Website
|
|
run: |
|
|
cd docs && npx tailwindcss -o ./tailwind.css --minify && cd ..
|
|
mv docs public
|
|
mv repo public || true
|
|
mv build/web/ public/web
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
|
publish_dir: ./public/web
|
|
publish_branch: gh-pages
|
|
# cname: app.staging.pangea.chat.im
|