-
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.
Automated publishing, see https://github.com/manorrock/bengal-book
- Loading branch information
Automated publish
committed
Mar 19, 2024
1 parent
04dabe1
commit 8bdbf03
Showing
35 changed files
with
5,398 additions
and
4 deletions.
There are no files selected for viewing
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,19 @@ | ||
FROM node:18 | ||
|
||
# Install basic development tools | ||
RUN apt update && \ | ||
apt install -y less man-db npm sudo | ||
|
||
# Ensure default `node` user has access to `sudo` | ||
ARG USERNAME=node | ||
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
# Set `DEVCONTAINER` environment variable to help with orientation | ||
ENV DEVCONTAINER=true | ||
|
||
USER node | ||
RUN cd $HOME && \ | ||
npm init --yes && \ | ||
npm install honkit --save-dev && \ | ||
npm install gitbook-plugin-hints --save-dev |
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,8 @@ | ||
// See https://containers.dev/implementors/json_reference/ for configuration reference | ||
{ | ||
"name": "Bengal Book project", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"remoteUser": "node" | ||
} |
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,28 @@ | ||
name: publish | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v3 | ||
- name: Build with honkit and publish to Bengal website | ||
run: | | ||
npm install honkit | ||
npm install gitbook-plugin-hints | ||
npx honkit build | ||
git clone https://${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_TOKEN }}@github.com/manorrock/website | ||
cd website | ||
rm -rf bengal/book || true | ||
mkdir -p bengal/book | ||
mv ../_book bengal/book | ||
rm -rf .devcontainer | ||
rm -rf .github | ||
rm -rf .gitignore | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Automated publish" | ||
git add . | ||
git commit -a -m "Automated publishing, see https://github.com/manorrock/bengal-book" | ||
git push | ||
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,5 @@ | ||
_book/ | ||
nbproject/ | ||
node_modules/ | ||
package-lock.json | ||
package.json |
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,9 @@ | ||
# Contributing | ||
|
||
If you want to contribute to the Bengal Book please use VSCode with a DevContainer as it is setup with the tooling you need. | ||
|
||
To serve up the book use: | ||
|
||
```shell | ||
npx honkit serve | ||
``` |
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,10 @@ | ||
|
||
README | ||
====== | ||
|
||
To build the book you will need to install all the relevant tools, | ||
or open it in a VSCode DevContainer. | ||
|
||
Then to build use: | ||
|
||
npx honkit serve |
Oops, something went wrong.