forked from krille-chan/fluffychat
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (77 loc) · 2.21 KB
/
main_deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Main Deploy Workflow
on:
push:
branches:
- main
workflow_dispatch:
env:
WEB_APP_ENV: ${{ vars.WEB_APP_ENV }}
jobs:
build_web:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Remove Emoji Font
run: |
rm -rf fonts/NotoEmoji
yq -i 'del( .flutter.fonts[] | select(.family == "NotoEmoji") )' pubspec.yaml
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh
- name: Build Release Web
run: ./scripts/build-web.sh
- name: Upload files
uses: actions/upload-artifact@v3
with:
name: web
path: build/web
deploy_web:
runs-on: ubuntu-latest
needs: build_web
environment: staging
steps:
- name: Download web
uses: actions/download-artifact@v3
with:
name: web
path: build/web
- name: Update Website files
run: |
mv build/web public
touch public/.env
echo "$WEB_APP_ENV" >> public/.env
cp public/.env public/assets/.env
- 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
cname: app.staging.pangea.chat
update_sentry:
runs-on: ubuntu-latest
needs: build_web
environment: staging
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_BASE_TOKEN: ${{ secrets.SENTRY_BASE_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
CI_COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
- name: Download web
uses: actions/download-artifact@v3
with:
name: web
path: build/web
- name: Install sentry CLI
run: |
curl -sL https://sentry.io/get-cli/ | bash
- name: Update sentry
run: ./scripts/upload-sentry.sh