forked from boostorg/gil
-
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.
docs: Updated GA workflow to publish with peaceiris/action-gh-pages (b…
- Loading branch information
1 parent
c6c19a0
commit 5374554
Showing
4 changed files
with
25 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Generate Doc' | ||
description: 'Runs b2 on lib/gil/doc to generate documentation' | ||
runs: | ||
using: composite | ||
steps: | ||
- run: | | ||
echo "using doxygen ;" > ~/user-config.jam | ||
cd ../boost-root/libs | ||
../b2 gil/doc | ||
cd gil | ||
chmod +x $GITHUB_WORKSPACE/.github/actions/generate-doc/docs-config.sh | ||
$GITHUB_WORKSPACE/.github/actions/generate-doc/docs-config.sh | ||
shell: bash |
20 changes: 6 additions & 14 deletions
20
...ons/generate-publish-doc/upload-script.sh → .github/actions/generate-doc/docs-config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,32 @@ | ||
#!/bin/bash | ||
set -e # Exit with Non Zero exit Code | ||
|
||
# Save some useful information | ||
SHA=`git rev-parse --verify HEAD` | ||
|
||
mkdir temp-doc | ||
cd temp-doc | ||
|
||
git init | ||
|
||
git config user.name "Github Action Upload Docs" | ||
git config user.email "Github Action Upload Docs" | ||
|
||
git remote add upstream "https://$1@github.com/boostorg/gil.git" | ||
git remote add upstream "https://github.com/boostorg/gil.git" | ||
|
||
git fetch upstream | ||
git switch gh-pages | ||
|
||
|
||
if [ "${GITHUB_REF##*/}" = develop ]; then | ||
# Only updates develop directory and keeps others intact | ||
rm -r develop | ||
mkdir -p develop/doc | ||
cp ../index.html develop/ | ||
cp ../doc/index.html develop/doc | ||
cp -a ../doc/html develop/doc/ | ||
else | ||
# main branch | ||
rm index.html | ||
rm -r html | ||
cp ../doc/index.html . | ||
cp -r ../doc/html . | ||
fi | ||
|
||
|
||
git add . | ||
|
||
# Commit the new version. | ||
git commit -m "Deploy to GitHub Pages: ${SHA}" | ||
|
||
# Now that we're all set up, we can push. | ||
git push -q upstream HEAD:gh-pages | ||
# Remove version control | ||
rm -rf .git |
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