Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 30, 2025

Overview

This PR introduces a reusable GitHub Actions composite action called copilot-setup-steps that encapsulates common setup steps for Jekyll and GitHub Pages workflows. This action promotes code reusability and consistency across CI/CD pipelines.

What's New

Composite Action (.github/actions/copilot-setup-steps/)

A new composite action that provides:

  • Automatic Repository Checkout: Uses actions/checkout@v4
  • Ruby Environment Setup: Configurable Ruby version with automatic bundler caching
  • GitHub Pages Configuration: Smart detection and configuration with graceful fallback
  • Helpful Status Messages: Clear instructions when Pages is not enabled

Action Features

Inputs:

  • ruby-version - Ruby version to use (default: 3.1)
  • bundler-cache - Enable bundler caching (default: true)
  • cache-version - Cache key version for invalidation (default: 0)

Outputs:

  • pages-enabled - Boolean indicating if GitHub Pages is configured
  • base-path - Base path for Jekyll build (when Pages is enabled)

Documentation

Action README (.github/actions/copilot-setup-steps/README.md)

  • Comprehensive usage guide with examples
  • Input/output reference tables
  • Troubleshooting section
  • Benefits and best practices

Example Workflow (.github/actions/copilot-setup-steps/example-workflow.yml)

  • Complete working example showing how to use the action
  • Demonstrates conditional logic based on action outputs
  • Includes both build and deploy jobs

User Guide (_instructions/github-actions-copilot-setup.md)

  • Detailed instruction following repository standards
  • Multiple usage scenarios (basic, advanced, multi-Ruby testing)
  • Best practices and common use cases
  • Troubleshooting guide with solutions

Usage Example

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Setup Environment
        id: setup
        uses: ./.github/actions/copilot-setup-steps
        with:
          ruby-version: '3.1'
      
      - name: Build with Jekyll
        run: |
          if [[ "${{ steps.setup.outputs.pages-enabled }}" == "true" ]]; then
            bundle exec jekyll build --baseurl "${{ steps.setup.outputs.base-path }}"
          else
            bundle exec jekyll build
          fi

Benefits

  • DRY Principle: Eliminates duplicate setup code across workflows
  • Consistency: Same environment setup across all CI/CD pipelines
  • Maintainability: Update setup logic in one place
  • Easy Integration: Simple to use with clear documentation
  • Error Resilience: Graceful handling when GitHub Pages is not enabled

Files Changed

  • Added .github/actions/copilot-setup-steps/action.yml - Composite action definition
  • Added .github/actions/copilot-setup-steps/README.md - Action documentation
  • Added .github/actions/copilot-setup-steps/example-workflow.yml - Usage example
  • Added _instructions/github-actions-copilot-setup.md - User guide instruction

Testing

  • ✅ YAML syntax validation passed
  • ✅ Action metadata is properly structured
  • ✅ Front matter follows repository instruction standards
  • ✅ All required composite action elements present (inputs, outputs, runs)

This action can now be used across any Jekyll-based workflows in the repository to streamline CI/CD configuration.

Original prompt

This section details on the original issue you should resolve

<issue_title>feat(ci): add copilot-setup-steps action</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #7

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] feat(ci): add copilot-setup-steps action feat(ci): add copilot-setup-steps composite action Sep 30, 2025
Copilot AI requested a review from MauGx3 September 30, 2025 05:08
@MauGx3 MauGx3 marked this pull request as ready for review September 30, 2025 14:38
Copilot AI review requested due to automatic review settings September 30, 2025 14:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a reusable GitHub Actions composite action called copilot-setup-steps to standardize Jekyll and GitHub Pages setup across CI/CD workflows. The action encapsulates common setup steps including repository checkout, Ruby environment configuration, and GitHub Pages setup with graceful fallback handling.

  • Adds a new composite action with configurable Ruby version, bundler caching, and cache versioning
  • Provides clear outputs for conditional workflow logic based on GitHub Pages status
  • Includes comprehensive documentation with usage examples and troubleshooting guides

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.github/actions/copilot-setup-steps/action.yml Composite action definition with inputs, outputs, and setup steps
.github/actions/copilot-setup-steps/README.md Action documentation with usage examples and troubleshooting
.github/actions/copilot-setup-steps/example-workflow.yml Complete example workflow demonstrating action usage
_instructions/github-actions-copilot-setup.md Comprehensive user guide following repository instruction standards

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MauGx3 MauGx3 requested a review from Copilot September 30, 2025 22:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@MauGx3 MauGx3 merged commit 3153026 into main Sep 30, 2025
8 checks passed
@MauGx3 MauGx3 deleted the copilot/fix-302c305a-3734-4291-867a-4d6735465d6a branch September 30, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ci): add copilot-setup-steps action

2 participants