mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 16:36:13 +00:00
Merge pull request #939 from nasa/openmct-website
[Website] #901 Automate build process
This commit is contained in:
commit
34d5bc4f28
@ -22,17 +22,19 @@
|
||||
#* at runtime from the About dialog for additional information.
|
||||
#*****************************************************************************
|
||||
|
||||
# Script to build and deploy docs to github pages.
|
||||
# Script to build and deploy docs.
|
||||
|
||||
OUTPUT_DIRECTORY="target/docs"
|
||||
REPOSITORY_URL="git@github.com:nasa/openmctweb.git"
|
||||
# Docs, once built, are pushed to the private website repo
|
||||
REPOSITORY_URL="git@github.com:nasa/openmct-website.git"
|
||||
WEBSITE_DIRECTORY="website"
|
||||
|
||||
BUILD_SHA=`git rev-parse head`
|
||||
BUILD_SHA=`git rev-parse HEAD`
|
||||
|
||||
# A remote will be created for the git repository we are pushing to.
|
||||
# Don't worry, as this entire directory will get trashed inbetween builds.
|
||||
REMOTE_NAME="documentation"
|
||||
WEBSITE_BRANCH="gh-pages"
|
||||
WEBSITE_BRANCH="master"
|
||||
|
||||
# Clean output directory, JSDOC will recreate
|
||||
if [ -d $OUTPUT_DIRECTORY ]; then
|
||||
@ -40,23 +42,21 @@ if [ -d $OUTPUT_DIRECTORY ]; then
|
||||
fi
|
||||
|
||||
npm run docs
|
||||
cd $OUTPUT_DIRECTORY || exit 1
|
||||
|
||||
echo "git init"
|
||||
git init
|
||||
echo "git clone $REPOSITORY_URL website"
|
||||
git clone $REPOSITORY_URL website || exit 1
|
||||
echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs"
|
||||
cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs
|
||||
echo "cd $WEBSITE_DIRECTORY"
|
||||
cd $WEBSITE_DIRECTORY || exit 1
|
||||
|
||||
# Configure github for CircleCI user.
|
||||
git config user.email "buildbot@circleci.com"
|
||||
git config user.name "BuildBot"
|
||||
|
||||
echo "git remote add $REMOTE_NAME $REPOSITORY_URL"
|
||||
git remote add $REMOTE_NAME $REPOSITORY_URL
|
||||
echo "git add ."
|
||||
git add .
|
||||
echo "git commit -m \"Generate docs from build $BUILD_SHA\""
|
||||
git commit -m "Generate docs from build $BUILD_SHA"
|
||||
|
||||
echo "git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f"
|
||||
git push $REMOTE_NAME HEAD:$WEBSITE_BRANCH -f
|
||||
|
||||
echo "Documentation pushed to gh-pages branch."
|
||||
echo "git commit -m \"Docs updated from build $BUILD_SHA\""
|
||||
git commit -m "Docs updated from build $BUILD_SHA"
|
||||
# Push to the website repo
|
||||
git push
|
||||
|
@ -1,8 +1,11 @@
|
||||
deployment:
|
||||
production:
|
||||
branch: master
|
||||
heroku:
|
||||
appname: openmctweb-demo
|
||||
commands:
|
||||
- npm install canvas nomnoml
|
||||
- ./build-docs.sh
|
||||
- git fetch--unshallow
|
||||
- git push git@heroku.com:openmctweb-demo.git $CIRCLE_SHA1:refs/heads/master
|
||||
openmct-demo:
|
||||
branch: live_demo
|
||||
heroku:
|
||||
|
Loading…
x
Reference in New Issue
Block a user