Merge pull request #632 from anikeef/fix-5th-chapter-exercise #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v2.3.1 | |
- name: Install Calibre | |
run: | | |
wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin | |
mkdir -p ~/.local/bin | |
ln -s /opt/calibre/calibre ~/.local/bin/calibre | |
ln -s /opt/calibre/ebook-convert ~/.local/bin/ebook-convert | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 10.22.1 | |
- name: Setup gitbook | |
run: | | |
npm install | |
npm run setup | |
- name: Generate PDF | |
run: | | |
npm run generate-pdf | |
mv book.pdf mostly-adequate-guide-to-functional-programming.pdf | |
- name: Generate EPUB | |
run: | | |
npm run generate-epub | |
mv book.epub mostly-adequate-guide-to-functional-programming.epub | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: PDF | |
path: mostly-adequate-guide-to-functional-programming.pdf | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: EPUB | |
path: mostly-adequate-guide-to-functional-programming.epub | |
- run: echo "::set-output name=ID::$(git describe --tags --always)" | |
id: release-id | |
- uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.release-id.outputs.ID }} | |
files: | | |
mostly-adequate-guide-to-functional-programming.pdf | |
mostly-adequate-guide-to-functional-programming.epub |