Skip to content

Commit b72aad7

Browse files
committed
Deploy book to GitHub Pages build
1 parent 9c72cfa commit b72aad7

File tree

44 files changed

+2371
-575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2371
-575
lines changed

contents/IFS/IFS.html

Lines changed: 48 additions & 5 deletions
Large diffs are not rendered by default.

contents/bitlogic/bitlogic.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/bogo_sort/bogo_sort.html

Lines changed: 84 additions & 41 deletions
Large diffs are not rendered by default.

contents/bubble_sort/bubble_sort.html

Lines changed: 98 additions & 55 deletions
Large diffs are not rendered by default.

contents/computational_geometry/computational_geometry.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/computer_graphics/computer_graphics.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/computus/computus.html

Lines changed: 49 additions & 6 deletions
Large diffs are not rendered by default.

contents/cooley_tukey/cooley_tukey.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/data_compression/data_compression.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/data_structures/data_structures.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/decision_problems/decision_problems.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/differential_equations/differential_equations.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/domain_coloring/domain_coloring.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/euclidean_algorithm/euclidean_algorithm.html

Lines changed: 115 additions & 72 deletions
Large diffs are not rendered by default.

contents/flood_fill/flood_fill.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/forward_euler_method/forward_euler_method.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/gaussian_elimination/gaussian_elimination.html

Lines changed: 48 additions & 5 deletions
Large diffs are not rendered by default.

contents/gift_wrapping/gift_wrapping.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/graham_scan/graham_scan.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/how_to_contribute/how_to_contribute.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/huffman_encoding/huffman_encoding.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/introduction/introduction.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/jarvis_march/jarvis_march.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/mathematical_background/mathematical_background.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/matrix_methods/matrix_methods.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/monte_carlo_integration/monte_carlo_integration.html

Lines changed: 106 additions & 63 deletions
Large diffs are not rendered by default.

contents/notation/notation.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/physics_solvers/physics_solvers.html

Lines changed: 48 additions & 5 deletions
Large diffs are not rendered by default.

contents/plotting/plotting.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/quantum_information/quantum_information.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/quantum_systems/quantum_systems.html

Lines changed: 52 additions & 9 deletions
Large diffs are not rendered by default.

contents/sorting_and_searching/sorting_and_searching.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/split-operator_method/split-operator_method.html

Lines changed: 50 additions & 7 deletions
Large diffs are not rendered by default.

contents/stable_marriage_problem/stable_marriage_problem.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/stacks_and_queues/stacks_and_queues.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/taylor_series_expansion/taylor_series_expansion.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/thomas_algorithm/thomas_algorithm.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

contents/tree_traversal/tree_traversal.html

Lines changed: 231 additions & 188 deletions
Large diffs are not rendered by default.

contents/verlet_integration/verlet_integration.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

gitbook/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gitbook/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 47 additions & 4 deletions
Large diffs are not rendered by default.

search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tools/deploy/update_site.bash

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env bash
2+
3+
# update_site_travis.bash: Update a GitHub repo with the book build
4+
# products.
5+
6+
GH_TOKEN=$1
7+
8+
set -o errexit
9+
10+
DOCS_BRANCH_NAME=master
11+
DOCS_REPO_NAME=algorithm-archivists.github.io
12+
DOCS_REPO_OWNER=algorithm-archivists
13+
14+
BOOK_BUILD_DIR=_book
15+
16+
# Required environment variables:
17+
# - DOCS_BRANCH_NAME: name of the remote branch serving the book
18+
# - DOCS_REPO_NAME: name of the remote repo
19+
# - DOCS_REPO_OWNER: name of the remote repo's owner
20+
# - GH_TOKEN: [secret] Personal Access Token
21+
22+
bold=$(tput bold)
23+
normal=$(tput sgr0)
24+
25+
if [[ -z ${DOCS_BRANCH_NAME+x} ]]; then
26+
echo "${bold}\$DOCS_BRANCH_NAME is not set!${normal}"
27+
exit 1
28+
elif [[ -z ${DOCS_REPO_NAME+x} ]]; then
29+
echo "${bold}\$DOCS_REPO_NAME is not set!${normal}"
30+
exit 1
31+
elif [[ -z ${DOCS_REPO_OWNER+x} ]]; then
32+
echo "${bold}\$DOCS_REPO_OWNER is not set!${normal}"
33+
exit 1
34+
elif [[ -z ${GH_TOKEN+x} ]]; then
35+
echo "${bold}\$GH_TOKEN is not set!${normal}"
36+
exit 1
37+
fi
38+
39+
git config --global user.name "James Schloss"
40+
git config --global user.email "jrs.schloss@gmail.com"
41+
42+
GH_REPO_REF="github.com/${DOCS_REPO_OWNER}/${DOCS_REPO_NAME}.git"
43+
44+
# Assume the book has already been built and lives in $BOOK_BUILD_DIR.
45+
book_check_file="${BOOK_BUILD_DIR}/index.html"
46+
47+
if [[ ! -d "${BOOK_BUILD_DIR}" ]]; then
48+
echo "" >&2
49+
echo "${bold}Warning: The book directory wasn't found!${normal}" >&2
50+
echo "${bold}Warning: Not going to push the book to GitHub!${normal}" >&2
51+
exit 1
52+
elif [[ ! -f "${book_check_file}" ]]; then
53+
echo "${bold}${book_check_file} not found!${normal}" >&2
54+
echo "${bold}${BOOK_BUILD_DIR} is present though.${normal}" >&2
55+
exit 1
56+
else
57+
echo "${bold}Cloning the website repo...${normal}"
58+
git clone -b "${DOCS_BRANCH_NAME}" https://git@"${GH_REPO_REF}"
59+
rm -rf ./"${DOCS_REPO_NAME}"/*
60+
cp -a "${BOOK_BUILD_DIR}"/* ./"${DOCS_REPO_NAME}"
61+
pushd ./"${DOCS_REPO_NAME}"
62+
echo "www.algorithm-archive.org" > CNAME
63+
echo "${bold}Adding changes...${normal}"
64+
git add --all
65+
echo "${bold}Committing...${normal}"
66+
# This will return 1 if there are no changes, which should not
67+
# result in failure.
68+
#git config user.email "jrs.schloss@gmail.com"
69+
#git config user.name "James Schloss"
70+
git commit -m "Deploy book to GitHub Pages build" || ret=$?
71+
git push "https://${GH_TOKEN}@${GH_REPO_REF}"
72+
#git push "https://${GH_REPO_REF}"
73+
#Username: leios
74+
#Password: GH_TOKEN
75+
popd
76+
fi

0 commit comments

Comments
 (0)