Git Product home page Git Product logo

Comments (16)

houcemlaw avatar houcemlaw commented on May 24, 2024 6

I've sorted it out using a custom GitHub Actions workflow.

Under Settings > Pages > Build and deployment select Github Actions instead of the default Deploy From a Branch then choose (or create) a jekyll configuration.
A config YAML file will be generated and placed under .github/workflows/

Here is what the file that i've used looks like :

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages

on:
  # Runs on pushes targeting the default branch
  push:
    branches: ["main"]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  # Build job
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Ruby
        uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
        with:
          ruby-version: '3.1' # Not needed with a .ruby-version file
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
          cache-version: 0 # Increment this number if you need to re-download cached gems
      - name: Setup Pages
        id: pages
        uses: actions/configure-pages@v4
      - name: Build with Jekyll
        # Outputs to the './_site' directory by default
        run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
        env:
          JEKYLL_ENV: production
      - name: Upload artifact
        # Automatically uploads an artifact from the './_site' directory by default
        uses: actions/upload-pages-artifact@v3

  # Deployment job
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

Hope this helps!

from jekyll.

YuyangXueEd avatar YuyangXueEd commented on May 24, 2024 4

Hi, academic-pages are all affected by this bug, any latest news to fix the bug soon?

from jekyll.

tjfentie avatar tjfentie commented on May 24, 2024 2

Without changing anything and pushing a build just now everything is back to working fine. Thank you to those who made the fix on this.

from jekyll.

yoannchaudet avatar yoannchaudet commented on May 24, 2024 1

This should be fixed now. Via #9544 (comment).

from jekyll.

mattr- avatar mattr- commented on May 24, 2024

This will be fixed by #9552. You'll need to wait for a new Jekyll release and for the GitHub pages gem to update.

from jekyll.

suhoshin avatar suhoshin commented on May 24, 2024

I'm facing exactly the same issue. When will this be released? Any plan?

from jekyll.

vppillai avatar vppillai commented on May 24, 2024

I'm also facing the same issue. Any plans to release the fix soon?

from jekyll.

qdread avatar qdread commented on May 24, 2024

Adding my +1 to this, I also have a fork of academic-pages and I am affected by the bug. Is there any temporary workaround until the release comes out?

from jekyll.

tjfentie avatar tjfentie commented on May 24, 2024

+1 I am also facing this issue using the minimal mistakes template.

from jekyll.

sachit3022 avatar sachit3022 commented on May 24, 2024

+1 I am also facing this issue using the minimal mistakes template.

from jekyll.

fsa avatar fsa commented on May 24, 2024

Liquid Exception: undefined method `yaml_file?' for #<Jekyll::Page @name="app.md"> in /_layouts/default.html
I recently redid the template, but it was assembled before. Posted a new blog post today and got this error.

from jekyll.

blitzcrg avatar blitzcrg commented on May 24, 2024

While awaiting the fix - is there a workaround?

from jekyll.

WilliamLwj avatar WilliamLwj commented on May 24, 2024

Same error here.

from jekyll.

ozkary avatar ozkary commented on May 24, 2024

Same error here. This error was raised this week. Last week, there was no problem building the pages:

/usr/local/bundle/gems/jekyll-3.9.5/lib/jekyll/excerpt.rb:91: warning: Jekyll::Excerpt#yaml_file? at /usr/local/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method Jekyll::Page#yaml_file?
  Liquid Exception: undefined method `yaml_file?' for #<Jekyll::Page:0x000056309be129f0> in /_layouts/default.html

from jekyll.

ozkary avatar ozkary commented on May 24, 2024

I did create a jekyll.yml file as described above. I got a Ruby error

Error: The process '/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle' failed with exit code 15 , which is another problem.

The pages are building now after fix #9544 was applied.

from jekyll.

houcemlaw avatar houcemlaw commented on May 24, 2024

I did create a jekyll.yml file as described above. I got a Ruby error

Error: The process '/opt/hostedtoolcache/Ruby/3.1.4/x64/bin/bundle' failed with exit code 15 , which is another problem.

The pages are building now after fix #9544 was applied.

You probably should create your own file depending on the versions you are using.

The fix is just a revert of jekyll-relative-links to version 0.6.1. So we will likely to expect the same dependency error should they consider upgrading the versions in the future.
Thing is, if your project is built locally without errors then there should be no reason to fail when built by GitHub.
GitHub Actions comes to adress these kind of issues by allowing to use the same environment as in development.
So I think that creating your own configuration file will definitely solve the problem once and for all.

from jekyll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.