I wanted to use the file from https://github.com/actions/starter-workflows/blob/main/pages/jekyll-gh-pages.yml, but I get an error while building that an included file could not be located.
This is the error message I get:
Run actions/jekyll-build-pages@v1
/usr/bin/docker run --name ghcrioactionsjekyllbuildpagesv109_6254c4 --label e01f22 --workdir /github/workspace --rm -e "GITHUB_PAGES" -e "INPUT_SOURCE" -e "INPUT_DESTINATION" -e "INPUT_FUTURE" -e "INPUT_BUILD_REVISION" -e "INPUT_VERBOSE" -e "INPUT_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_ID_TOKEN_REQUEST_URL" -e "ACTIONS_ID_TOKEN_REQUEST_TOKEN" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/kaelwi.github.io/kaelwi.github.io":"/github/workspace" ghcr.io/actions/jekyll-build-pages:v1.0.9
Configuration file: none
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
Liquid Exception: Could not locate the included file 'image.html' in any of ["/github/workspace/_includes", "/usr/local/bundle/gems/jekyll-theme-primer-0.6.0/_includes"]. Ensure it exists in one of those directories and is not a symlink as those are not allowed in safe mode. in /github/workspace/docs/_posts/blogovani/2024-02-05-jak-zalozit-blog.markdown
/usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/tags/include.rb:121:in `locate_include_file': Could not locate the included file 'image.html' in any of ["/github/workspace/_includes", "/usr/local/bundle/gems/jekyll-theme-primer-0.6.0/_includes"]. Ensure it exists in one of those directories and is not a symlink as those are not allowed in safe mode. (IOError)
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/tags/include.rb:130:in `render'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/block_body.rb:103:in `render_node_to_output'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/block_body.rb:91:in `render'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:206:in `block in render'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:240:in `with_profiling'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:205:in `render'
from /usr/local/bundle/gems/liquid-4.0.4/lib/liquid/template.rb:218:in `render!'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:126:in `render_liquid'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:79:in `render_document'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/renderer.rb:62:in `run'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:479:in `render_regenerated'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:464:in `block (2 levels) in render_docs'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:463:in `each'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:463:in `block in render_docs'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:462:in `each_value'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:462:in `render_docs'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:191:in `render'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:71:in `process'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/command.rb:28:in `process_site'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:65:in `build'
from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/commands/build.rb:36:in `process'
from /usr/local/bundle/gems/github-pages-228/bin/github-pages:70:in `block (3 levels) in <top (required)>'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /usr/local/bundle/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /usr/local/bundle/gems/github-pages-228/bin/github-pages:6:in `<top (required)>'
from /usr/local/bundle/bin/github-pages:23:in `load'
from /usr/local/bundle/bin/github-pages:23:in `<main>'
Error: Logging at level: debug GitHub Pages: github-pages v228 GitHub Pages: jekyll v3.9.3 Theme: jekyll-theme-primer Theme source: /usr/local/bundle/gems/jekyll-theme-primer-0.6.0 Requiring: jekyll-github-metadata Requiring: jekyll-seo-tag Requiring: jekyll-coffeescript Requiring: jekyll-commonmark-ghpages Requiring: jekyll-gist Requiring: jekyll-github-metadata Requiring: jekyll-paginate Requiring: jekyll-relative-links Requiring: jekyll-optional-front-matter Requiring: jekyll-readme-index Requiring: jekyll-default-layout Requiring: jekyll-titles-from-headings GitHub Metadata: Initializing... Source: /github/workspace/./ Destination: /github/workspace/./_site Incremental build: disabled. Enable with --incremental Generating... Reading: docs/_posts/blogovani/2024-02-12-jak-vytvorit-prispevek.markdown Reading: docs/_posts/blogovani/2024-02-05-jak-zalozit-blog.markdown Reading: docs/_posts/blogovani/2024-02-08-zakladni-konfigurace-blogu.markdown Skipping: docs/_posts/blogovani/2024-02-12-jak-vytvorit-prispevek.markdown has a future date Skipping: docs/_posts/blogovani/2024-02-08-zakladni-konfigurace-blogu.markdown has a future date Generating: JekyllOptionalFrontMatter::Generator finished in 0.00010124 seconds. Generating: JekyllReadmeIndex::Generator finished in 0.001558418 seconds. Generating: Jekyll::Paginate::Pagination finished in 2.695e-06 seconds. Generating: JekyllRelativeLinks::Generator finished in 0.000116849 seconds. Generating: JekyllDefaultLayout::Generator finished in 0.00011217 seconds. Requiring: kramdown-parser-gfm Generating: JekyllTitlesFromHeadings::Generator finished in 0.008005233 seconds. Rendering: docs/_posts/blogovani/2024-02-05-jak-zalozit-blog.markdown Pre-Render Hooks: docs/_posts/blogovani/2024-02-05-jak-zalozit-blog.markdown Rendering Liquid: docs/_posts/blogovani/2024-02-05-jak-zalozit-blog.markdown Requiring: rouge Requiring: kramdown-parser-gfm Requiring: kramdown-parser-gfm Requiring: kramdown-parser-gfm Requiring: kramdown-parser-gfm github-pages 228 | Error: Could not locate the included file 'image.html' in any of ["/github/workspace/_includes", "/usr/local/bundle/gems/jekyll-theme-primer-0.6.0/_includes"]. Ensure it exists in one of those directories and is not a symlink as those are not allowed in safe mode.
The workflow "pages build and deployment" is working. I do have the file 'image.html' located inside the _includes folder in my repository (inside the docs folder).
Repository structure:
.github/workflows
docs
- _includes
- _layouts
- _posts
- assets
Usage of include image.html:
{% include image.html url="/assets/images/blogovani/explorer.JPG" description="1" %}
Used theme: minima
Any help would be appreciated!
Thanks.
At first I went with https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml, but I got an error because the baseurl is not set.
I get the same problem with the GitHub Actions demo.