-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (36 loc) · 965 Bytes
/
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
name: Compile to Javascript
on:
push:
branches: ["main", "ci-*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 12
- name: Prepare Branches
run: |
git fetch --all
git checkout --track origin/dist
git checkout ${{ github.ref }}
- name: Build
run: |
yarn
yarn build
- name: Commit
run: |
git checkout --detach
git reset --soft dist --
git add dist -f
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Update compiled files"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist