Skip to content

Commit 675f84c

Browse files
authored
Update scripts/deploy-website.sh (#1923)
1 parent 5cb5b02 commit 675f84c

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

scripts/deploy-website.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,27 @@
1616

1717
set -e
1818

19-
# Set this:
20-
base_folder=/opt/github
19+
base_folder=$HOME/github-automation
20+
github_organization="boostorg"
21+
list_of_repos="${github_organization}/boostlook ${github_organization}/website-v2-docs ${github_organization}/website-v2"
2122

22-
list_of_repos="boostorg/boostlook boostorg/website-v2-docs boostorg/website-v2"
23+
mkdir -p ${base_folder}/${github_organization}
24+
cd ${base_folder}/${github_organization}
25+
echo "It's recommended to not modify anything in this directory." > README.md
26+
echo "It will be reserved for automation scripts." >> README.md
27+
echo "During day to day work use any other directories such as $HOME/github, /opt/, $HOME/opt/ etc." >> README.md
2328

2429
for repo in ${list_of_repos}; do
30+
echo ""
31+
echo "====================================="
32+
echo "REPOSITORY: ${repo}"
33+
echo "====================================="
34+
echo ""
35+
cd ${base_folder}/${github_organization}
2536
repo_dir="${base_folder}/${repo}"
2637
if [ ! -d "${repo_dir}" ]; then
27-
echo "The directory of ${repo} does not exist at ${repo_dir}."
28-
echo "This script assumes you have already checked out the codebase locally."
29-
echo "Check if you have configured the variable base_folder correctly."
30-
echo "Exiting."
31-
exit 1
38+
git clone -b develop https://github.com/$repo
3239
fi
33-
3440
cd "${repo_dir}"
3541

3642
echo "checking 'git diff'"
@@ -86,7 +92,7 @@ for repo in ${list_of_repos}; do
8692
echo "Running 'git push' from the master branch"
8793
git push
8894

89-
if [ "$repo" = "boostorg/boostlook" ]; then
95+
if [ "$repo" = "${github_organization}/boostlook" ]; then
9096
echo "Deployed boostlook. Waiting 5 minutes before proceeding, since that triggers github actions on other repos."
9197
echo "This step may be adjusted later."
9298
sleep 300

0 commit comments

Comments
 (0)