mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
MIT License
399 stars 88 forks source link

I've tried to build my site at github pages using m.css but seems github pages only build from Jekyll, not pellican #238

Closed marioseixas closed 11 months ago

marioseixas commented 11 months ago

I'm trying to migrate my github pages blog (https://github.com/marioseixas/marioseixas.github.io) from jekyll to m.css but seems that github pages only support jekyl. not pellican, right?

If so, what are the alternatives to host a blog based on m.css that has it's files on a github repository and cannot be built via github pages?

Thanks in advance

Build error:

##[debug]Evaluating condition for step: 'Build with Jekyll'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Build with Jekyll
##[debug]Loading inputs
##[debug]Evaluating: github.sha
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'sha'
##[debug]=> '3543[2](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:2)c02ac4ed7094272[3](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:3)c9ca95c8b2[4](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:4)797fc9[5](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:5)3'
##[debug]Result: '35432c02ac4ed70942723c9ca95c8b24797fc953'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run actions/jekyll-build-pages@v1
/usr/bin/docker run --name ghcrioactionsjekyllbuildpagesv108_e5d19a --label 2a[6](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:6)c8c --workdir /github/workspace --rm -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_DEBUG" -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 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/marioseixas.github.io/marioseixas.github.io":"/github/workspace" ghcr.io/actions/jekyll-build-pages:v1.0.8
Configuration file: none
  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
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
/usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:129:in `chdir': Not a directory @ dir_chdir - /github/workspace/marioseixas.github.io/_posts (Errno::ENOTDIR)
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:129:in `get_entries'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/readers/post_reader.rb:62:in `read_content'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/readers/post_reader.rb:3[7](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:7):in `read_publishable'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/readers/post_reader.rb:27:in `read_posts'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:64:in `retrieve_posts'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:50:in `read_directories'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:[8](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:8)0:in `block in retrieve_dirs'
    from /usr/local/bundle/gems/jekyll-3.[9](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:9).3/lib/jekyll/reader.rb:76:in `each'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:76:in `retrieve_dirs'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:51:in `read_directories'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/reader.rb:[16](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:16):in `read'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:164:in `read'
    from /usr/local/bundle/gems/jekyll-3.9.3/lib/jekyll/site.rb:69: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](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:19):in `program'
    from /usr/local/bundle/gems/github-pages-[22](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:22)8/bin/github-pages:6:in `<top (required)>'
    from /usr/local/bundle/bin/github-pages:[23](https://github.com/marioseixas/marioseixas.github.io/actions/runs/5469886456/job/14810576954#step:4:23):in `load'
    from /usr/local/bundle/bin/github-pages:23:in `<main>'
         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... 
       EntryFilter: excluded /Gemfile.lock
github-pages 228 | Error:  Not a directory @ dir_chdir - /github/workspace/marioseixas.github.io/_posts
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Build with Jekyll
crisluengo commented 11 months ago

You have to build your pelican blog locally, and upload only the HTML to your GitHub repo. GitHub will happily show your generated HTML.

You can even have two branches, one where you keep your sources, and one where you keep the generated HTML, if you really want to store the sources in the same repo. Or you can just open another repo for the sources.

marioseixas commented 11 months ago

You have to build your pelican blog locally, and upload only the HTML to your GitHub repo. GitHub will happily show your generated HTML.

You can even have two branches, one where you keep your sources, and one where you keep the generated HTML, if you really want to store the sources in the same repo. Or you can just open another repo for the sources.

Thanks!

I saw your git repo but seems that your sites are not made as you explained above.

Anyone has github repositories that did as above to maintain a site/blog?

crisluengo commented 11 months ago

This repo has just HTML (and of course CSS and other related files): https://github.com/DIPlib/diplib-docs It's served at https://diplib.org/diplib-docs/

I just re-build the web site locally, git commit and git push to update the website. It's not Pelican, but how the HTML was generated is irrelevant. What matters is that it's generated locally and pushed to GitHub, GitHub is not using Jekyll to generate it.

marioseixas commented 11 months ago

Perfect, thank you so much!