-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.9 KB
/
main.yaml
File metadata and controls
56 lines (56 loc) · 1.9 KB
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
name: Main
on:
push:
branches: ['master', 'main', 'epic/*']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: valitydev/action-frontend/setup-install@v2
- name: Build
run: npm run build
- name: Deploy image
uses: valitydev/action-deploy-docker@v2
with:
registry-username: ${{ github.actor }}
registry-access-token: ${{ secrets.GITHUB_TOKEN }}
- name: set config
run: |
printf "$APP_ENV_FILE" > dist/apps/control-center/browser/assets/appConfig.json
printf "$AUTH_ENV_FILE" > dist/apps/control-center/browser/assets/authConfig.json
env:
APP_ENV_FILE: ${{secrets.APP_CONF}}
AUTH_ENV_FILE: ${{secrets.AUTH_CONF}}
- name: Publish to CF Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'cc'
directory: 'dist/apps/control-center/browser'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: main
- name: Publish MatEz Library
uses: valitydev/action-frontend/publish@v1.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
directory: ./dist/libs/matez
- name: Publish NgThrift Library
uses: valitydev/action-frontend/publish@v1.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
directory: ./dist/libs/ng-thrift
notify:
name: Notify
runs-on: ubuntu-latest
needs: [deploy]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: valitydev/action-mattermost-notify@v0.1.4
with:
webhook: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
channel: 'control-center-improvements'
username: 'Frontend'