-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1009 Bytes
/
run_node.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: Run Node.js and Commit Results
on:
push:
branches:
- main # Sesuaikan dengan branch yang Anda gunakan
jobs:
run-and-commit:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Sesuaikan versi Node.js jika diperlukan
# Step 3: Install dependencies
- name: Install dependencies
run: npm install
# Step 4: Jalankan perintah yang diperlukan
- name: Run Node script
run: node index.js test.csv
# Step 5: Commit changes jika ada perubahan pada file
- name: Commit and Push changes
uses: github-actions-x/commit@v3
with:
commit-message: "Commit generated files from Node script"
push: true
branch: main # Sesuaikan dengan branch yang Anda gunakan