-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAIRSPC-87: added workflow to Build and deploy docs to Github Pages a…
…nd fixed table in doc
- Loading branch information
1 parent
ea7b39d
commit 7039fa8
Showing
4 changed files
with
37 additions
and
24 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
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
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,25 @@ | ||
#!/usr/bin/env bash | ||
# the script pulls the documentation repository, copies the built documentation to the repository, commits and pushes the changes | ||
# the documentation repository is configured to deploy the documentation to the GitHub Pages on push to the main branch | ||
set -e | ||
|
||
cd .. | ||
export DOCS_REPO="https://${CI_SERVICE_ACCOUNT_USER}:${CI_SERVICE_ACCOUNT_PASSWORD}@github.com/thehyve/${DOCUMENTATION_REPO}" | ||
echo "Cloning documentation repository ${DOCS_REPO} ..." | ||
git clone --branch main "${DOCS_REPO}" fairspace-docs | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "${CI_SERVICE_ACCOUNT_USER}" | ||
export DOCS_DIR=$(pwd)/fairspace-docs | ||
|
||
cp -r ./fairspace/docs/build/* "${DOCS_DIR}/" | ||
|
||
pushd "${DOCS_DIR}" | ||
if [ ! "$(git status -s)" == "" ]; then | ||
echo "Committing changes to ${DOCUMENTATION_REPO} ..." | ||
git add . | ||
git commit -a -m "Update documentation" | ||
git push "${DOCS_REPO}" main | ||
else | ||
echo "Documentation unchanged." | ||
fi | ||
popd |