Move the parser action into the repo

pull/21/head
Brogan Clements 2022-04-22 00:44:14 -04:00
parent b6d66a5e90
commit 554f75c5f3
1 changed files with 49 additions and 0 deletions

49
.github/workflows/parser.yml vendored Normal file
View File

@ -0,0 +1,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: Senior-Design-2021-Ebook-Team/markdown-parser
path: parser
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: npm install -g https://github.com/Senior-Design-2021-Ebook-Team/markdown-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"