2018-01-22 12:55:02 -06:00
|
|
|
version: 2
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
branches:
|
|
|
|
|
only: [master]
|
|
|
|
|
working_directory: /tmp/danielrayjones
|
2019-08-19 09:59:38 -05:00
|
|
|
docker:
|
2023-11-22 22:22:04 -06:00
|
|
|
- image: hugomods/hugo:0.120.4
|
2018-01-22 12:55:02 -06:00
|
|
|
steps:
|
2023-03-29 14:11:13 -05:00
|
|
|
- add_ssh_keys:
|
|
|
|
|
fingerprints:
|
|
|
|
|
- "23:c0:43:4c:ae:5b:92:a6:5b:79:92:6b:ca:62:59:8d"
|
2018-01-22 12:55:02 -06:00
|
|
|
- checkout
|
|
|
|
|
- run:
|
|
|
|
|
name: Configure git user
|
|
|
|
|
command: |
|
2018-01-22 13:16:14 -06:00
|
|
|
git config --global user.email "ci@danielrayjones.com"
|
2018-01-22 12:55:02 -06:00
|
|
|
git config --global user.name "Circle CI"
|
2023-11-23 10:31:15 -06:00
|
|
|
- run:
|
|
|
|
|
name: Install dependencies
|
|
|
|
|
command: |
|
|
|
|
|
git submodule init
|
|
|
|
|
git submodule update
|
2018-01-22 12:55:02 -06:00
|
|
|
- run:
|
|
|
|
|
name: Creating build directory
|
2023-11-22 22:22:04 -06:00
|
|
|
command: git clone -b gh-pages `git remote get-url origin` public
|
2018-01-22 12:55:02 -06:00
|
|
|
- run:
|
|
|
|
|
name: Build site
|
2023-11-22 22:22:04 -06:00
|
|
|
command: hugo --cleanDestinationDir
|
2018-01-22 12:55:02 -06:00
|
|
|
- run:
|
|
|
|
|
name: No Jekyll
|
2023-11-22 22:22:04 -06:00
|
|
|
command: touch public/.nojekyll
|
2018-01-22 12:55:02 -06:00
|
|
|
- run:
|
|
|
|
|
name: Deploy site
|
|
|
|
|
command: |
|
2023-11-22 22:22:04 -06:00
|
|
|
cd public
|
2018-01-22 14:20:09 -06:00
|
|
|
git add -A
|
|
|
|
|
git commit -m "$(date --iso-8601=seconds) Deploy new site"
|
2018-01-22 12:55:02 -06:00
|
|
|
git push
|