ci: Only release web on releases and add nightly builds
This commit is contained in:
parent
f903d54d52
commit
07c9b832cb
2 changed files with 16 additions and 10 deletions
12
.github/workflows/main_deploy.yaml
vendored
12
.github/workflows/main_deploy.yaml
vendored
|
|
@ -19,26 +19,18 @@ jobs:
|
||||||
with:
|
with:
|
||||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||||
cache: true
|
cache: true
|
||||||
- name: Install dependencies
|
|
||||||
run: sudo apt-get update && sudo apt-get install nodejs -y
|
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: Prepare web
|
- name: Prepare web
|
||||||
run: ./scripts/prepare-web.sh
|
run: ./scripts/prepare-web.sh
|
||||||
- name: Build Release Web
|
- name: Build Release Web
|
||||||
run: flutter build web --dart-define=FLUTTER_WEB_CANVASKIT_URL=canvaskit/ --release --source-maps --base-href "/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
|
|
||||||
echo "fluffychat.im" > ./public/CNAME
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./build/web
|
||||||
publish_branch: gh-pages
|
publish_branch: gh-pages
|
||||||
|
destination_dir: nightly
|
||||||
|
|
||||||
deploy_playstore_internal:
|
deploy_playstore_internal:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
14
.github/workflows/release.yaml
vendored
14
.github/workflows/release.yaml
vendored
|
|
@ -42,6 +42,20 @@ jobs:
|
||||||
asset_path: fluffychat-web.tar.gz
|
asset_path: fluffychat-web.tar.gz
|
||||||
asset_name: fluffychat-web.tar.gz
|
asset_name: fluffychat-web.tar.gz
|
||||||
asset_content_type: application/gzip
|
asset_content_type: application/gzip
|
||||||
|
- 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
|
||||||
|
cp public/web -r public/nightly
|
||||||
|
echo "fluffychat.im" > ./public/CNAME
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
|
||||||
|
publish_dir: ./public
|
||||||
|
publish_branch: gh-pages
|
||||||
|
|
||||||
build_apk:
|
build_apk:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue