👷 Build Hugo site in CircleCI

This commit is contained in:
Dan Jones 2023-11-22 22:22:04 -06:00
commit 6dd4b7bc56
4 changed files with 6 additions and 42 deletions

View file

@ -5,7 +5,7 @@ jobs:
only: [master]
working_directory: /tmp/danielrayjones
docker:
- image: ruby:2.7
- image: hugomods/hugo:0.120.4
steps:
- add_ssh_keys:
fingerprints:
@ -16,24 +16,19 @@ jobs:
command: |
git config --global user.email "ci@danielrayjones.com"
git config --global user.name "Circle CI"
- run:
name: Install dependencies
command: |
gem install bundler:2.0.2
bundle check || bundle install
- run:
name: Creating build directory
command: git clone -b gh-pages `git remote get-url origin` _site
command: git clone -b gh-pages `git remote get-url origin` public
- run:
name: Build site
command: bundle exec jekyll build
command: hugo --cleanDestinationDir
- run:
name: No Jekyll
command: touch _site/.nojekyll
command: touch public/.nojekyll
- run:
name: Deploy site
command: |
cd _site
cd public
git add -A
git commit -m "$(date --iso-8601=seconds) Deploy new site"
git push

View file

@ -1,21 +0,0 @@
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
time: "11:00"
open-pull-requests-limit: 10
target-branch: master
reviewers:
- goodevilgenius
labels:
- dependencies
ignore:
- dependency-name: sprockets
versions:
- ">= 4.a, < 5"
- dependency-name: nokogiri
versions:
- 1.11.1
- 1.11.2

12
.gitignore vendored
View file

@ -1,15 +1,5 @@
_site
.DS_Store
.jekyll
.jekyll-metadata
.bundle
.asset-cache
.jekyll-cache
.sass-cache
node_modules
package.json
_config.local.yml
.image
*.~undo-tree~
.hugo_build.lock
public/

View file