Open ashleygould opened 1 month ago
Currently exploring use of jekyll build --watch
as systemd service. I set up a unit file with puppet. this looks good. But I think I need to do something more for authentication to work. Also, I'm not clear on how to specify which branch to watch.
here is output from systemctl status:
agould@uc3-ezid-arks-dev-01:~> sudo systemctl status jekyll-watch
● jekyll-watch.service - Run jekyll in watch mode to automatically update content
Loaded: loaded (/etc/systemd/system/jekyll-watch.service; enabled; preset: disabled)
Active: active (running) since Fri 2024-05-10 16:45:37 PDT; 2 days ago
Docs: https://github.com/CDLUC3/arksorg-site
Main PID: 392660 (ruby3.2)
Tasks: 4 (limit: 1055)
Memory: 5.8M
CPU: 3.068s
CGroup: /system.slice/jekyll-watch.service
└─392660 ruby3.2 /ezid/.local/share/gem/ruby/bin/jekyll build --config _config.yml,../_config.local.yml --watch --incremental
May 10 16:45:39 uc3-ezid-arks-dev-01 bundle[392660]: To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: Source: /apps/ezid/arksorg/arks.github.io
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: Destination: ../site
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: Incremental build: enabled
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: Generating...
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: Jekyll Feed: Generating feed for posts
May 10 16:45:40 uc3-ezid-arks-dev-01 bundle[392660]: GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
May 10 16:45:41 uc3-ezid-arks-dev-01 bundle[392660]: Liquid Warning: Liquid syntax error (line 21): Unexpected character " in "{{ post.date | date: "%Y-%m-%d" "}}" in /_brand/layouts/posts.html
May 10 16:45:42 uc3-ezid-arks-dev-01 bundle[392660]: done in 1.958 seconds.
May 10 16:45:42 uc3-ezid-arks-dev-01 bundle[392660]: Auto-regeneration: enabled for '/apps/ezid/arksorg/arks.github.io'
Docs suggest I need to include the https://github.com/jekyll/github-metadata Gem in Gemfile, add config to _config.yaml, and set up user token in github.
I also need to figure out how to do testing and validation.
jekyll build --watch
was a dead end. opting for running ansible playbook from crontab. See PR #6
The repo arks.github.io is a submodule of this repo. During deployment with ansible, we run
jekyll build
to compile the github pages content. We need a way to do this independantly of ansible deployment.Options:
--watch
option in jekyll to sync and build content when changes to submodule repo occur. This can be run as a systemd service.