Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy.sh #971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
# Deployment Script
#!/bin/bash

# Install awesome_bot gem
gem install awesome_bot
awesome_bot docs/*.md docs/articles/*.md docs/case-studies/*.md docs/extras/*.md docs/guidelines/*.md docs/installers/*.md docs/learning-resources/*.md docs/managed-kubernetes/*.md docs/official-resources/*.md docs/projects/*.md --allow-redirect --white-list linkedin.com,blog.kcluster.io,telepresence.io,kismatic.com,slideshare.net,research.google.com,kubespray.io,twitter.com,github.com,creativecommons.org,cloud.oracle.com,amazon.com --allow-dupe

# Run awesome_bot with specified files and whitelist
awesome_bot docs/*.md docs/articles/*.md docs/case-studies/*.md docs/extras/*.md \
docs/guidelines/*.md docs/installers/*.md docs/learning-resources/*.md \
docs/managed-kubernetes/*.md docs/official-resources/*.md docs/projects/*.md \
--allow-redirect \
--white-list linkedin.com,blog.kcluster.io,telepresence.io,kismatic.com,slideshare.net,research.google.com,kubespray.io,twitter.com,github.com,creativecommons.org,cloud.oracle.com,amazon.com \
--allow-dupe

# Get the current branch
branch1=$(git rev-parse --abbrev-ref HEAD)

if [[ $branch1 == 'master' ]]; then
echo "Found Master Branch"
python3 -m pip install -r requirements.txt
sudo apt-get update -y
# sudo apt-get install -y mkdocs
# mkdocs gh-deploy
echo "Found Master Branch"

# TBD: Refactor this section for modular dependency handling
python3 -m pip install -r requirements.txt

sudo apt-get update -y

# TBD: Evaluate mkdocs usage and potentially re-enable the lines below
# sudo apt-get install -y mkdocs
# mkdocs gh-deploy

else
echo "Not found master branch."
fi
echo "Not found master branch."
# TBD: Add logic for handling non-master branches
fi