mirror of
https://github.com/Start9Labs/documentation.git
synced 2026-03-30 04:01:59 +00:00
update build scripts
This commit is contained in:
18
site/_utils/deploy_gh_pages.sh
Executable file
18
site/_utils/deploy_gh_pages.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy contents
|
||||
mkdir gh-pages
|
||||
cp -r ./docs/_build/dirhtml/. gh-pages
|
||||
|
||||
# Create gh-pages branch
|
||||
cd gh-pages
|
||||
git init
|
||||
git config --local user.email "dev@start9labs.com"
|
||||
git config --local user.name "Start9 Dev"
|
||||
git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
git checkout -b gh-pages
|
||||
|
||||
# Deploy
|
||||
git add .
|
||||
git commit -m "Publish docs" || true
|
||||
git push origin gh-pages --force
|
||||
Reference in New Issue
Block a user