Skip to content

Commit b094f2b

Browse files
author
Invers3
authored
Create generate lastposts.yml
1 parent 770bdf0 commit b094f2b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate lastposts.json
2+
3+
on:
4+
push:
5+
paths:
6+
- '_posts/**' # Solo se ejecuta cuando hay cambios en esta carpeta
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '20' # Asegúrate de que tu versión de Node.js sea compatible
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Generate lastposts.json
25+
run: node generateLastPosts.js
26+
27+
- name: Commit lastposts.json
28+
run: |
29+
git config --global user.email "manyandacreaty@gmail.com"
30+
git config --global user.name "CodeInvers3"
31+
git add lastposts.json
32+
git commit -m "Update lastposts.json"
33+
git push
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)