Skip to content

Commit 7068ed3

Browse files
committed
deployment automated
1 parent 81689e0 commit 7068ed3

4 files changed

Lines changed: 30 additions & 4 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
vendor
22
_site
33
Gemfile.lock
4+
node_modules
5+
public
6+
resources

config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
title = "Elekto"
22
baseURL = "https://elekto.io"
33
disableKinds = ["taxonomy", "taxonomyTerm"]
4+
publishDir = "docs"
45

56
enableRobotsTXT = true
67

content/en/_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1>
5757
{{% /blocks/lead %}}
5858

5959
{{< blocks/section color="dark" >}}
60-
{{% blocks/feature icon="fa-lightbulb" title="Join us on Slack!" %}}
60+
{{% blocks/feature icon="fab fa-slack" title="Join us on Slack!" %}}
6161
The Goldydocs UI now shows chair size metrics by default.
6262

6363
Please follow this space for updates!

deploy.sh

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,28 @@
1212
#See the License for the specific language governing permissions and
1313
#limitations under the License.
1414
#
15-
rm -rf public/
16-
HUGO_ENV="production" hugo --gc || exit 1
17-
s3deploy -source=public/ -region=eu-west-1 -bucket=bep.is -distribution-id=E8OKNT7W9ZYZ2 -path temp/td
15+
16+
set -e # If a command fails then the deploy stops
17+
printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
18+
19+
if [ "`git status -s`" ]
20+
then
21+
echo "The working directory is dirty. Please commit any pending changes."
22+
exit 1;
23+
fi
24+
25+
echo "Deleting old publication"
26+
rm -rf docs
27+
mkdir docs
28+
git worktree prune
29+
rm -rf .git/worktrees/docs/
30+
31+
echo "Generating site"
32+
hugo
33+
echo "elekto.io"> docs/CNAME
34+
35+
echo "Updating gh-pages branch"
36+
git add docs && git commit -m "Publishing to github (deploy.sh)"
37+
38+
echo "Pushing to github"
39+
git push --all

0 commit comments

Comments
 (0)