Skip to content

Instantly share code, notes, and snippets.

@0xdade
Created November 15, 2019 21:31
Show Gist options
  • Save 0xdade/742f4f480a23aea926b52108e0df9b99 to your computer and use it in GitHub Desktop.
Save 0xdade/742f4f480a23aea926b52108e0df9b99 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Enter repository folder and pull the latest version
# (This is done with a read-only deploy key on a private repo)
# `hugo` with no parameters builds the default version of the site, which has baseUrl="https://0xda.de"
# Copy the built files (from public/*) into the webserver folder
# Build a new version of the site with the baseUrl set to the onion address
# Copy the built files from public/* to the onion web server directory
cd 0xdade.github.com && \
git pull && \
hugo && \
cp -r public/* /var/www/0xda.de/ && \
hugo -b "http://dadedade5akzwc4p.onion" && \
cp -r public/* /var/www/dade-onion/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment