Skip to content

Instantly share code, notes, and snippets.

@KharmaScribbles
Created June 16, 2018 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KharmaScribbles/7d14b1cab323936a0c589633cf222c47 to your computer and use it in GitHub Desktop.
Save KharmaScribbles/7d14b1cab323936a0c589633cf222c47 to your computer and use it in GitHub Desktop.
I STILL have not figured out how I'd like to build my blog..
## Hosted on Github, built in Gitlab (source https://dev.to/ardianta/deploy-hugo-from-gitlab-ci-to-github-pages-5aml)
image: andthensome/alpine-hugo-git-bash:0.31.2
before_script:
- hugo version
github_pages:
script:
- rm -rf public
- git clone --depth 1 https://<username>:$GITHUB_ACCESS_TOKEN@github.com/<username>/<username>.github.io.git public
- hugo --config config.production.toml
- cd public
- git config user.email "<your git email>"
- git config --global user.name "<your git name>"
- git add -A
- git commit -m "Build from $CI_SERVER_NAME $CI_PIPELINE_ID"
- git push
artifacts:
paths:
- public
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment