forked from SoftUni/Programming-Basics-Book-Java-EN
-
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.
Added a build script for GitHub Actions; deleted broken plugin
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
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,34 @@ | ||
name: Gitbook Build & Deploy to gh-pages | ||
|
||
on: [workflow_dispatch] | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and Deploy Gitbook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the source code from GitHub | ||
uses: actions/checkout@v2 | ||
with: { fetch-depth: 0 } | ||
- name: Install Node.js (version 10, not higher!) | ||
uses: actions/setup-node@v2 | ||
with: { node-version: '10' } | ||
- name: Install Gitbook CLI client (gitbook-cli) | ||
run: npm install -g gitbook-cli | ||
- name: Install Gitbook plugins (git install) | ||
run: gitbook install | ||
- name: Build the book to the `_book` folder (git build) | ||
run: gitbook build . --log=debug --debug | ||
- name: Checkout the `gh-pages` branch into the `_gh-pages` folder | ||
run: git worktree add ./_gh-pages gh-pages | ||
- name: Copy the compiled book files to `_gh-pages` | ||
run: cp -R ./_book/* ./_gh-pages | ||
- name: Commit and push the changed book files in the `gh-pages` branch | ||
run: | | ||
cd _gh-pages | ||
git add . | ||
git status | ||
git config --local user.name "github-actions-gitbook-bot" | ||
git config --local user.email "[email protected]" | ||
git commit -m "Book web site deployment" | ||
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
"anchors", | ||
"expandable-chapters-small", | ||
"katex", | ||
"sitemap", | ||
"scripts" | ||
], | ||
"pluginsConfig": { | ||
|