We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6378272 commit db073beCopy full SHA for db073be
1 file changed
publish_to_ghpages.sh
@@ -0,0 +1,23 @@
1
+
2
+#!/bin/sh
3
4
+echo "Deleting old publication"
5
+rm -rf public
6
+mkdir public
7
+git worktree prune
8
+rm -rf .git/worktrees/public/
9
10
+echo "Checking out gh-pages branch into public"
11
+git worktree add -B gh-pages public origin/gh-pages
12
13
+echo "Removing existing files"
14
+rm -rf public/*
15
16
+echo "Generating site"
17
+hugo
18
19
+echo "Updating gh-pages branch"
20
+cd public && git add --all && git commit -m "Publishing to gh-pages"
21
22
+echo "Pushing changes"
23
+git push origin gh-pages
0 commit comments