-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (26 loc) · 1.05 KB
/
ci.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
name: Trigger CI
on:
push:
branches-ignore:
- 'main'
- 'staging'
jobs:
triggerCI:
runs-on: ubuntu-latest
steps:
- name: Preview deploy via repository dispatch
if: ${{ github.ref_name != 'main' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_FRONTEND_CI_REPO_PAT }}
repository: artizen-fund/artizen-frontend-ci
event-type: preview
client-payload: '{"env": "preview", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "branchname": "${{ github.ref_name }}", "dry_run":false}'
- name: Production deploy via repository dispatch
if: ${{ github.ref_name == 'main' }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_FRONTEND_CI_REPO_PAT }}
repository: artizen-fund/artizen-frontend-ci
event-type: production
client-payload: '{"env": "production", "ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "branchname": "${{ github.ref_name }}", "dry_run":false}'