-
Notifications
You must be signed in to change notification settings - Fork 4
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
7c8f1b2
commit ea7b39d
Showing
3 changed files
with
59 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,39 @@ | ||
# This workflow is triggered on any PR's changes | ||
|
||
name: Build and deploy docs to Github Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- bugfix/FAIRSPC-87 | ||
|
||
|
||
jobs: | ||
build-saturn: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log details | ||
run: | | ||
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | ||
echo "Triggered on branch: $BRANCH" | ||
- name: Set up Ruby (required for gem installation) | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
|
||
- name: Install Asciidoctor | ||
run: | | ||
gem install asciidoctor | ||
gem install asciidoctor-pdf | ||
gem install rouge | ||
- name: Run Build Docs script | ||
run: ./docs/build.sh | ||
|
||
- name: Run Deploy Docs script | ||
run: ./docs/deploy.sh | ||
|
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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd .. | ||
git clone "https://${CI_SERVICE_ACCOUNT_USER}:${CI_SERVICE_ACCOUNT_PASSWORD}@github.com/${DOCUMENTATION_REPO}" fairspace-docs | ||
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 from the documentation branch of ${TRAVIS_REPO_SLUG}." | ||
git push "https://${GITHUB_USERNAME}:${GITHUB_PASSWORD}@github.com/${DOCUMENTATION_REPO}" main | ||
else | ||
echo "Documentation unchanged." | ||
fi | ||
popd |