-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.13 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
name: Bundle and Push
on:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
permissions:
contents: write
env:
NODE_ENV: production
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
run_install: |
- recursive: false
- args: [--global, gulp]
- name: Clone dist branch
run: git clone -b dist https://github.com/${{ github.repository }} dist
- name: Bundle project
run: pnpm run build
- name: Commit
run: |
cd dist
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: build"
- name: Push to dist branch
run: |
cd dist
git remote set-url origin https://PFiS1737:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin dist