-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (51 loc) · 1.78 KB
/
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
name: Zips on deploy branch
on:
push:
branches:
- trunk
jobs:
deploy_job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: deploy
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- uses: pnpm/action-setup@v4
with:
version: 8.7.1
- name: Clear build folders to avoid merge conflicts
run: npm run admin:clear:build
- name: Merge trunk -> deploy
uses: devmasx/merge-branch@master
with:
type: now
from_branch: trunk
target_branch: deploy
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Show current branch
run: git branch --show-current
- name: Show last commit
run: git log --oneline --graph
- name: Pull changes for branch deploy
run: git pull origin deploy
- name: Show last commit
run: git log --oneline --graph
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run deploy
run: npm run deploy
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "Add changes" --no-verify
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: deploy