-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ed5e4b8
commit 87abab5
Showing
8 changed files
with
128 additions
and
817 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,66 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: cachix/install-nix-action@v6 | ||
- run: | | ||
mkdir -p ~/.config/nixpkgs | ||
echo '{ allowUnfree = true; }' > ~/.config/nixpkgs/config.nix | ||
- uses: cachix/cachix-action@v3 | ||
with: | ||
name: czerwonamaupa | ||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: web | ||
path: result | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: dialektyka-oswiecenia.epub | ||
path: result/ebooks | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: dialektyka-oswiecenia.mobi | ||
path: result/ebooks | ||
|
||
gh-pages: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: web | ||
path: . | ||
- uses: JamesIves/github-pages-deploy-action@releases/v3 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: web | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: dialektyka-oswiecenia.epub | ||
path: . | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: dialektyka-oswiecenia.mobi | ||
path: . | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dialektyka-oswiecenia.epub | ||
dialektyka-oswiecenia.mobi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/styles/ebook.css | ||
/ebooks/* | ||
/*.html | ||
/*.css | ||
/*.epub | ||
/*.mobi | ||
/result |
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,24 @@ | ||
with import <nixpkgs> {}; | ||
let | ||
pandoc = import (fetchTarball { | ||
url = "https://github.com/czerwonamaupa/pandoc/archive/413af81436a09f554a2ee575f063d8abed15ecd6.tar.gz"; | ||
sha256 = "1q7bc087ipp8bb0gf9yr29wh0mgvrb7ipsx3gcpi94ann2knykak"; | ||
}) {}; | ||
pythonInputs = python3.withPackages (pkgs: with pkgs; [pandocfilters pyphen]); | ||
drv = stdenv.mkDerivation { | ||
pname = "Dialektyka-Oswiecenia"; | ||
version = "v1.4"; | ||
src = nix-gitignore.gitignoreSource [] ./.; | ||
buildInputs = [ pandoc kindlegen pythonInputs ]; | ||
installPhase = '' | ||
mkdir -p $out/web | ||
cp -r {index.html,web.css,fonts} $out/web | ||
mkdir -p $out/ebooks | ||
cp dialektyka-oswiecenia.{epub,mobi} $out/ebooks | ||
''; | ||
}; | ||
shell = mkShell { | ||
inputsFrom = [ drv ]; | ||
buildInputs = [ entr ]; | ||
}; | ||
in drv // { inherit shell; } |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,34 +1,36 @@ | ||
default : index.html ebooks/dialektyka-oswiecenia.mobi | ||
default : index.html dialektyka-oswiecenia.mobi | ||
|
||
index.html : chapters/* styles/index.css styles/html.css template.t filters/* | ||
web.css : styles/index.css styles/html.css | ||
cat styles/index.css > web.css && cat styles/html.css >> web.css | ||
|
||
index.html : chapters/* web.css template.t filters/* | ||
pandoc \ | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
-o index.html \ | ||
-c styles/index.css \ | ||
-c styles/html.css \ | ||
--template template.t \ | ||
chapters/* | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
-o index.html \ | ||
-c web.css \ | ||
--template template.t \ | ||
chapters/* | ||
|
||
styles/ebook.css : styles/index.css styles/epub.css | ||
cat styles/index.css > styles/ebook.css && cat styles/epub.css >> styles/ebook.css | ||
ebook.css : styles/index.css styles/epub.css | ||
cat styles/index.css > ebook.css && cat styles/epub.css >> ebook.css | ||
|
||
ebooks/dialektyka-oswiecenia.epub : chapters/* styles/ebook.css template.t filters/* cover.jpg | ||
dialektyka-oswiecenia.epub : chapters/* ebook.css template.t filters/* cover.jpg | ||
pandoc \ | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
--toc-depth=2 \ | ||
--epub-cover-image cover.jpg \ | ||
-o ebooks/dialektyka-oswiecenia.epub \ | ||
-c styles/ebook.css \ | ||
--template template.t \ | ||
-t epub3 \ | ||
chapters/* | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
--toc-depth=2 \ | ||
--epub-cover-image cover.jpg \ | ||
-o dialektyka-oswiecenia.epub \ | ||
-c ebook.css \ | ||
--template template.t \ | ||
-t epub3 \ | ||
chapters/* | ||
|
||
ebooks/dialektyka-oswiecenia.mobi : ebooks/dialektyka-oswiecenia.epub | ||
kindlegen ebooks/dialektyka-oswiecenia.epub | ||
dialektyka-oswiecenia.mobi : dialektyka-oswiecenia.epub | ||
kindlegen dialektyka-oswiecenia.epub | ||
|
||
clean : | ||
$(RM) ebooks/* index.html styles/ebook.css | ||
$(RM) dialektyka-oswiecenia.epub dialektyka-oswiecenia.mobi index.html web.css ebook.css |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
(import ./.).shell |
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