update sync script again (#1578)

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
This commit is contained in:
Charlie Drage 2023-02-08 16:09:33 -05:00 committed by GitHub
parent 055856076a
commit 13919e2050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
## cd script
## ./manual-docs-sync.sh
##
## This will take all documentation from the /docs folder of the master dir and push to the gh-pages branch (granted you have access)
## This will take all documentation from the /docs folder of the main dir and push to the gh-pages branch (granted you have access)
DOCS_REPO_NAME="kompose"
DOCS_REPO_URL="git@github.com:kubernetes/kompose.git"
@ -15,12 +15,12 @@ DOCS_FOLDER="docs"
# clone the repo
git clone "$DOCS_REPO_URL" "$DOCS_REPO_NAME"
# change to that directory (to prevent accidental pushing to master, etc.)
# change to that directory (to prevent accidental pushing to main, etc.)
cd "$DOCS_REPO_NAME"
# switch to gh-pages and grab the docs folder from master
# switch to gh-pages and grab the docs folder from main
git checkout gh-pages
git checkout master docs
git checkout main docs
# Copy it all over to the current directory
cp -r docs/* .
@ -28,7 +28,7 @@ rm -r docs
git add --all
# Check if anything changed, and if it's the case, push to origin/master.
# Check if anything changed, and if it's the case, push to origin/main.
if git commit -m 'Update docs' -m "Synchronize documentation against website" ; then
git push
fi