-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.7 KB
/
vercel-deploy.yml
File metadata and controls
61 lines (51 loc) · 1.7 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
57
58
59
60
61
name: Synchronize to repo deploy
on:
push:
branches:
- main
- develop
jobs:
sync-main:
name: Sync main to production repo
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
token: ${{ secrets.PERMIT_TICKET_DEPLOY_TOKEN }}
fetch-depth: 0
ref: main
- name: Add remote-url for main
run: |
git remote add production-repo https://pepperdad:${{ secrets.PERMIT_TICKET_DEPLOY_TOKEN }}@github.com/pepperdad/permit-ticket
git config user.name pepperdad
git config user.email becomegoodguy@gmail.com
- name: Push changes to production-repo for main
run: |
git push -f production-repo main
- name: Clean up for main
run: |
git remote remove production-repo
sync-develop:
name: Sync develop to development repo
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
steps:
- name: Checkout develop
uses: actions/checkout@v4
with:
token: ${{ secrets.PERMIT_TICKET_DEPLOY_TOKEN }}
fetch-depth: 0
ref: develop
- name: Add remote-url for develop
run: |
git remote add development-repo https://pepperdad:${{ secrets.PERMIT_TICKET_DEPLOY_TOKEN }}@github.com/pepperdad/permit-ticket
git config user.name pepperdad
git config user.email becomegoodguy@gmail.com
- name: Push changes to development-repo for develop
run: |
git push -f development-repo develop
- name: Clean up for develop
run: |
git remote remove development-repo