-
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
9dfb63c
commit fa6682f
Showing
7 changed files
with
115 additions
and
421 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: New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
path: result/ebooks | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: New-Introductory-Lectures-On-Psycho-Analysis.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: New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
path: . | ||
- uses: actions/download-artifact@v1 | ||
with: | ||
name: New-Introductory-Lectures-On-Psycho-Analysis.mobi | ||
path: . | ||
- uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
New-Introductory-Lectures-On-Psycho-Analysis.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,6 @@ | ||
/styles/ebook.css | ||
/ebooks/* | ||
/result | ||
/*.css | ||
/*.html | ||
/*.zip | ||
/*.mobi | ||
/*.epub |
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 = "New-Introductory-Lectures-On-Psycho-Analysis"; | ||
version = "v1.5"; | ||
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 New-Introductory-Lectures-On-Psycho-Analysis.{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/New-Introductory-Lectures-On-Psycho-Analysis.mobi | ||
default : index.html New-Introductory-Lectures-On-Psycho-Analysis.mobi | ||
|
||
index.html : New-Introductory-Lectures-On-Psycho-Analysis.md styles/index.css styles/html.css filters/* template.t | ||
web.css : styles/index.css styles/html.css | ||
cat styles/index.css > web.css && cat styles/html.css >> web.css | ||
|
||
index.html : New-Introductory-Lectures-On-Psycho-Analysis.md web.css filters/* template.t | ||
pandoc \ | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
-o index.html \ | ||
-c styles/index.css \ | ||
-c styles/html.css \ | ||
-c web.css \ | ||
--template template.t \ | ||
New-Introductory-Lectures-On-Psycho-Analysis.md | ||
|
||
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/New-Introductory-Lectures-On-Psycho-Analysis.epub : New-Introductory-Lectures-On-Psycho-Analysis.md styles/ebook.css filters/* template.t cover.png | ||
New-Introductory-Lectures-On-Psycho-Analysis.epub : New-Introductory-Lectures-On-Psycho-Analysis.md ebook.css filters/* template.t cover.png | ||
pandoc \ | ||
-s \ | ||
--filter filters/hyphenate.py \ | ||
--section-divs \ | ||
--toc-depth=1 \ | ||
--epub-cover-image cover.png \ | ||
-o ebooks/New-Introductory-Lectures-On-Psycho-Analysis.epub \ | ||
-c styles/ebook.css \ | ||
-o New-Introductory-Lectures-On-Psycho-Analysis.epub \ | ||
-c ebook.css \ | ||
--template template.t \ | ||
-t epub3 \ | ||
New-Introductory-Lectures-On-Psycho-Analysis.md | ||
|
||
ebooks/New-Introductory-Lectures-On-Psycho-Analysis.mobi : ebooks/New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
kindlegen ebooks/New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
New-Introductory-Lectures-On-Psycho-Analysis.mobi : New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
kindlegen New-Introductory-Lectures-On-Psycho-Analysis.epub | ||
|
||
clean : | ||
$(RM) ebooks/* index.html styles/ebook.css | ||
$(RM) index.html ebook.css web.css New-Introductory-Lectures-On-Psycho-Analysis.epub New-Introductory-Lectures-On-Psycho-Analysis.mobi |
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