Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: 2
- workflows:
- version: 2
- build:
- jobs:
- - build
- - deploy:
- requires:
- - build
- filters:
- branches:
- only: master
- jobs:
- build:
- docker:
- - image: cibuilds/hugo:latest
- working_directory: ~/blog
- environment:
- HUGO_BUILD_DIR: public
- steps:
- - run: apk update && apk add git
- - checkout
- - run: HUGO_ENV=production hugo -F -v -d $HUGO_BUILD_DIR
- - persist_to_workspace:
- root: public
- paths: .
- deploy:
- docker:
- - image: node:8.10.0
- steps:
- - checkout
- - attach_workspace:
- at: public
- - run:
- name: Disable jekyll builds
- command: touch public/.nojekyll
- - run:
- name: Custom Domain
- command: echo "example.domain" > public/CNAME
- - run:
- name: Install and configure dependencies
- command: |
- npm install -g --silent gh-pages@2.0.1
- git config user.email "ci-build@example.domain"
- git config user.name "ci-build"
- - add_ssh_keys:
- fingerprints:
- - "a4:2f:c8:ed:e9:cd:b7:70:36:18:f8:55:c9:16:f2:5c"
- - run:
- name: Delete All SSH keys and Add the installed one
- command: ssh-add -D && ssh-add ~/.ssh/id_rsa_a42fc8ede9cdb7703618f855c916f25c
- - run:
- name: Deploy docs to gh-pages branch
- command: gh-pages --dotfiles --message "[skip ci] Updates" --dist public
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement