generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.22 KB
/
build-dist-and-push.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
name: "build-dist-and-push"
on:
push:
branches:
- main
- "releases/*"
jobs:
build-and-push: # Keep the dist updated
runs-on: ubuntu-latest
if: github.event.head_commit.author.email != '[email protected]' # Stop infinite loops
steps:
- name: Get Admin Bot Token
uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v2
with:
token: ${{ steps.generate_token.outputs.token }}
- name: Set Node.js 16.x
uses: actions/[email protected]
with:
node-version: 16.x
- name: Install dependencies
run: npm ci
- name: Rebuild the dist/ directory
run: |
npm run build
npm run package
- name: Commit and push the changes
uses: ./
with:
token: ${{ steps.generate_token.outputs.token }}
branchToPushTo: main
intervalSeconds: 10
shouldCommit: true
commitMessage: "Updating dist with latest changes"
commitArgs: "-a --no-verify --allow-empty"
authorEmail: "[email protected]"