yurikoval / middleman-gh-pages-action

A GitHub Action to build and deploy Middleman to Github Pages
https://github.com/marketplace/actions/middleman-github-pages-action
16 stars 17 forks source link

Ruby version should be based on users ruby #4

Closed hovancik closed 1 year ago

hovancik commented 1 year ago

My Action fails with Your Ruby version is 3.2.2, but your Gemfile specified 3.1.3.

name: Middleman

on:
  push:
    branches: [develop]

jobs:
  build_and_deploy:
    name: Build & Deploy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.1.3' # Not needed with a .ruby-version file
          bundler-cache: true # runs 'bundle install' and caches installed gems automatically
      - name: Build & Deploy to GitHub Pages
        with:
          REMOTE_BRANCH: trunk
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        uses: yurikoval/middleman-gh-pages-action@master
yurikoval commented 1 year ago

The current implementation is not a composite and runs in Docker which uses the latest ruby version. You can either upgrade your project to the latest ruby, or fork this repo and specify your own version in the Docker file:

FROM ruby:3.1.3

I think moving forward, it'd be good to rewrite this action using the composite action to leverage custom user setup and caching.