update typo in slice.md (#98) #97
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: 'continous deployment' | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
generate_webbook: | |
name: 'generate webbook' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
check-latest: true | |
- run: npm install | |
- name: generate assets | |
run: | | |
npm run build | |
- name: publish webbook | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build | |
publish_branch: gh-pages | |
generate_ebook: | |
needs: generate_webbook | |
name: 'generate ebook' | |
runs-on: ubuntu-latest | |
steps: | |
- name: sleep for 30 seconds | |
run: sleep 30s | |
shell: bash | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: install prince | |
run: | | |
curl https://www.princexml.com/download/prince-14.2-linux-generic-x86_64.tar.gz -O | |
tar zxf prince-14.2-linux-generic-x86_64.tar.gz | |
cd prince-14.2-linux-generic-x86_64 | |
yes "" | sudo ./install.sh | |
- name: build pdf | |
run: npx docusaurus-prince-pdf -u https://dasarpemrogramanrust.novalagung.com --include-index | |
- name: install pdftk | |
run: sudo apt install pdftk | |
- name: join cover and pdf | |
run: | | |
pdftk "etc/cover ebook.pdf" pdf/dasarpemrogramanrust.novalagung.com.pdf cat output pdf/dasarpemrogramanrust.pdf | |
rm -f pdf/dasarpemrogramanrust.novalagung.* | |
- name: publish ebook | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./pdf | |
publish_branch: ebooks |