-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cfe0ea1
Showing
154 changed files
with
21,626 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions | ||
name: CI | ||
|
||
on: | ||
push: | ||
# branches: | ||
# - master | ||
# pull_request: | ||
# types: [opened, reopened] | ||
|
||
jobs: | ||
build: | ||
|
||
# https://github.com/actions/runner-images | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Install Calibre | ||
run: | | ||
sudo apt update | ||
sudo apt install calibre # for `ebook-convert` command | ||
# https://github.com/actions/setup-node | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
# https://github.com/actions/checkout | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# https://github.com/honkit/honkit | ||
- name: Run Honkit | ||
run: | | ||
npm install honkit --save-dev | ||
npx honkit build . public --log=debug | ||
npx honkit pdf . byte-of-python.pdf | ||
npx honkit epub . byte-of-python.epub | ||
# https://github.com/crazy-max/ghaction-github-pages | ||
- name: Push to GitHub Pages | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v2 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: public | ||
fqdn: python.swaroopch.com | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# https://github.com/actions/create-release | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.sha }} | ||
release_name: Release v${{ github.sha }} | ||
draft: false | ||
prerelease: false | ||
|
||
# https://github.com/actions/upload-release-asset | ||
- name: Upload Release PDF | ||
id: upload-release-pdf | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include | ||
# a `upload_url`. See this blog post for more info: | ||
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./byte-of-python.pdf | ||
asset_name: byte-of-python.pdf | ||
asset_content_type: application/pdf | ||
|
||
# https://github.com/actions/upload-release-asset | ||
- name: Upload Release EPUB | ||
id: upload-release-epub | ||
uses: actions/upload-release-asset@v1.0.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include | ||
# a `upload_url`. See this blog post for more info: | ||
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./byte-of-python.epub | ||
asset_name: byte-of-python.epub | ||
asset_content_type: application/epub+zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
_book | ||
*.pyc | ||
.*.sw* | ||
byte_of_python.html | ||
byte_of_python.xml | ||
byte_of_python.pdf | ||
byte_of_python.epub | ||
byte_of_python.mobi | ||
node_modules | ||
byte-of-python.epub | ||
byte-of-python.pdf | ||
package-lock.json | ||
package.json | ||
public | ||
venv | ||
.vscode |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python.swaroopch.com |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
``` | ||
# install node.js | ||
# see https://nodejs.dev/learn/how-to-install-nodejs | ||
# install honkit | ||
npm install honkit --save-dev | ||
# show website running locally | ||
npx honkit serve | ||
# generate website files | ||
npx honkit build . public --log=debug | ||
# generate pdf | ||
npx honkit pdf . byte-of-python.pdf | ||
# generate epub | ||
npx honkit epub . byte-of-python.epub | ||
``` | ||
|
||
See https://github.com/honkit/honkit and https://honkit.netlify.app/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# https://github.com/honkit/honkit | ||
setup: | ||
npm install honkit --save-dev | ||
|
||
build: | ||
npx honkit build . public --log=debug | ||
|
||
pdf: | ||
npx honkit pdf . byte-of-python.pdf | ||
|
||
epub: | ||
npx honkit epub . byte-of-python.epub | ||
|
||
serve: | ||
npx honkit serve |
Oops, something went wrong.