Skip to content

free-programming-books-parse #540

free-programming-books-parse

free-programming-books-parse #540

Workflow file for this run

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"