Skip to content

feat: update contributing #256

feat: update contributing

feat: update contributing #256

Workflow file for this run

name: 'deploy website and ebooks'
on:
push:
branches:
- master
jobs:
job_deploy_website:
name: 'deploy website'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/setup-node@v2
with:
node-version: 11
check-latest: true
- name: 'Generating distributable files'
run: |
rm -f README.md
mv content/* .
mv etc/* .
npm install -g gitbook-cli
mv ./book.json ./book.json.template
gitbook install
cd ~/.gitbook/versions/3.2.3 && npm i npm@5
cd ${{ github.workspace }}
mv ./book.json.template ./book.json
gitbook install
go run fix-webbook.go -type=pre
gitbook build
go run fix-webbook.go -type=post
cd _book
echo '<html><head><meta http-equiv="refresh" content="0; url=https://dasarpemrogramangolang.novalagung.com/"></head></html>' > 404.html
rm -rf LICENSE
rm -rf book*
rm -rf .git
rm -rf .gitignore
rm -rf .github
rm -rf *.md
rm -rf *.sh
rm -rf *.psd
rm -rf *.go
rm -rf *.css
rm -rf *.js
- name: 'Deploying'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
job_deploy_ebook:
name: 'deploy ebook'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/setup-node@v2
with:
node-version: 11
check-latest: true
- name: 'Installing requirements'
run: |
npm install -g gitbook-cli svgexport
sudo apt install libegl1 libopengl0
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
- name: 'Generating distributable files'
run: |
rm -f README.md
mv content/* .
mv etc/* .
rm -f book.json
go run fix-ebook.go -type=pre
mkdir _book
gitbook install
- name: 'Generating ebook in pdf'
run: gitbook pdf ./ ./_book/dasarpemrogramangolang.pdf
- name: 'Generating ebook in epub'
run: gitbook epub ./ ./_book/dasarpemrogramangolang.epub
- name: 'Generating ebook in mobi'
run: gitbook mobi ./ ./_book/dasarpemrogramangolang.mobi
- name: 'Deploying'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
publish_branch: ebooks