File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments