-
Notifications
You must be signed in to change notification settings - Fork 52
62 lines (52 loc) · 1.72 KB
/
push-fe-build-to-main.yml
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
name: Push build to Main
on:
push:
branches:
- cypress/e2e-tests
paths:
- "frontend/**"
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.WORKFLOW_API_TOKEN }}
- name: Remove old build files
run: |
find backend/src/zango/assets/app_panel/js -name "build.*.min.js" -type f -delete
find backend/src/zango/assets/app_panel/js -name "build.*.min.js.LICENSE.txt" -type f -delete
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
run: |
cd frontend
yarn install
- name: Building app
run: |
cd frontend
CI=false yarn build
- name: Remove old build files
run: |
find backend/src/zango/assets/app_panel/js -name "build.*.min.js.LICENSE.txt" -type f -delete
- name: Setup Git for commit
run: |
git config user.name "github-actions"
git config user.email ${{ secrets.USER_EMAIL }}
- name: Commit and push build
run: |
git add backend/src/zango/assets/app_panel/js
git commit -m "Deploy frontend build"
git push origin cypress/e2e-tests
# - name: Notify on z-deployment_notifs slack channel
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_WEBHOOK: ${{ secrets.Z_DEPOY_NOTIFS_SLACK_WEBHOOK_URL }}
# SLACK_TITLE: New push of frontend build in ${{ github.event.repository.name }}
# SLACK_CHANNEL: "z-deployment-notifs"