Created
June 16, 2018 00:31
-
-
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..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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