forked from EbookFoundation/free-programming-books-search
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.22 KB
/
parser.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
47
48
49
name: free-programming-books-parse
on:
workflow_dispatch:
inputs:
reason:
required: true
default: "update json files"
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout self
uses: actions/checkout@v2
with:
path: json
- name: Checkout programming books
uses: actions/checkout@v2
with:
repository: EbookFoundation/free-programming-books
path: fpb
- name: Checkout parser
uses: actions/checkout@v2
with:
repository: EbookFoundation/free-programming-books-parser
path: parser
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install -g https://github.com/EbookFoundation/free-programming-books-parser
- run: fpb-parse --output ./json/fpb.json
- name: Commit Changes
run: |
cd './json'
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add -f 'fpb.json'
git commit -m "update fpb.json"
- name: Push changes
uses: ad-m/github-push-action@master
with:
directory: "./json"