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