-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.08 KB
/
node.js.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
name: Build Assets.json
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js & Build Assets.json
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm i
- run: npm run build
- run: |
git config --global user.name 'Kellojo'
git config --global user.email '[email protected]'
git commit -am "Automated assets.json update"
git push
- name: Push Assets.json to GitHub Pages Project
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.MESH_KIT_PUSH_PAT }}
with:
source_file: 'assets.json'
destination_repo: 'Kellojo/Mesh-Kit'
destination_folder: 'src/assets/'
user_email: '[email protected]'
user_name: 'Kellojo'
commit_message: 'Updated assets.json via automated workflow'