Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
postpic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LabAstro
postpic
Commits
6b74ab9a
Commit
6b74ab9a
authored
Oct 26, 2020
by
Stephan Kuschel
Browse files
Options
Downloads
Patches
Plain Diff
build script to create/update gh-pages branch
parent
aeb2188c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
update-gh-pages-branch.sh
+53
-0
53 additions, 0 deletions
update-gh-pages-branch.sh
with
53 additions
and
0 deletions
update-gh-pages-branch.sh
0 → 100755
+
53
−
0
View file @
6b74ab9a
#!/bin/bash
#
# This file is part of postpic.
#
# postpic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# postpic is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright Stephan Kuschel, 2020
# This script creates the documentation as html and saves it to the
# "gh-pages" branch.
set
-eux
# ensure Working Directory is clean
git diff-index
--quiet
HEAD
if
!
git rev-parse
--verify
--quiet
gh-pages
;
then
current_branch
=
$(
git branch
--show-current
)
echo
'create empty and orphan gh-pages branch'
git checkout
--orphan
gh-pages
git reset
git commit
--allow-empty
--no-verify
-m
"init empty gh-pages branch"
git checkout
-f
$current_branch
fi
# assert that Working Directory is still clean
git diff-index
--quiet
HEAD
SHA
=
$(
git rev-parse
--verify
HEAD
)
# create documentation on gh-pages branch
rm
-rf
doc/build/html
git worktree add
-f
doc/build/html gh-pages
cd
doc
make html
cd
build/html
touch
.nojekyll
git add
.
git commit
-a
--no-verify
-m
"postpic documentation at
$SHA
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment