-
Notifications
You must be signed in to change notification settings - Fork 819
/
Copy pathdeploywebsite.sh
46 lines (44 loc) · 1.49 KB
/
deploywebsite.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# To update the website:
#
# Install Hugo locally, by downloading a version (at least 0.92) and unpacking:
#
# In $HUGODIR:
#
# wget https://github.com/gohugoio/hugo/releases/download/v0.91.2/hugo_0.91.2_Linux-64bit.tar.gz
# tar xvf hugo_0.91.2_Linux-64bit.tar.gz
#
# This creates a binary $HUGODIR/hugo
#
# In a go-cloud clone, run:
#
# $HUGODIR/hugo -s internal/website
#
# This updates the internal/website/public directory with the new contents of
# the website. Now we'll need a separate clone of go-cloud, with the gh-pages
# branch checked out:
#
# git clone [email protected]:google/go-cloud.git GH-PAGES-CLONE
# cd GH-PAGES-CLONE
# git co gh-pages
#
# This should have the contents of the website (configured in
# https://github.com/google/go-cloud/settings/pages).
#
# Once that's ready, copy the contents of internal/website/public into the root
# directory of the clone that's on the gh-pages branch, e.g. with rsync:
#
# rsync -avc internal/website/public/ GH-PAGES-CLONE
#
# Commit into the gh-pages branch and push it to origin (git push origin
# gh-pages). This deploys the new site contents.
# (Old)
# Here's what we had in Travis:
# install: "curl -fsSL https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_0.54.0_Linux-64bit.tar.gz | tar zxf - -C \"$HOME\" hugo"
# script: "HUGO_GOOGLEANALYTICS=UA-135118641-1 \"$HOME/hugo\" -s internal/website"
# deploy:
# provider: pages
# edge: true
# fqdn: gocloud.dev
# skip-cleanup: true
# local-dir: internal/website/public