Skip to content

fix: configure action to build site #1

fix: configure action to build site

fix: configure action to build site #1

Workflow file for this run

name: Jekyll site CI
on:
push:
branches:
- staging # Set this to your default branch
pull_request:
branches:
- main # Set this to your default branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.2 # Choose the Ruby version compatible with your Jekyll site
- name: Build and test
run: |
gem install bundler
bundle install
bundle exec jekyll build
- name: Deploy to GitHub Pages - staging
if: github.ref == 'refs/heads/staging' # This ensures the deploy step only runs on push events to the main branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site # This is the default build directory for Jekyll