Skip to content

Commit

Permalink
Update jekyll.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
supernord committed Mar 5, 2025
1 parent 132851c commit 264d9a5
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,36 @@
name: Jekyll site CI

on:
push:
pull_request:
branches: [ master, main ]

branches: [ main, master ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest

build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1.127.0
uses: ruby/setup-ruby@v1.204.0
with:
ruby-version: '3.1'
ruby-version: '3.3'
bundler-cache: true
cache-version: 0

- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5

- name: Install dependencies
run: |
Expand All @@ -42,8 +43,30 @@ jobs:
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
PAGES_REPO_NWO: ${{ github.repository }}
JEKYLL_ENV: ${{ steps.name.outputs.jekyll_env }}
JEKYLL_ENV: production
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JEKYLL_BUILD_BRANCH: ${{ github.ref_name }}
JEKYLL_BASE_PATH: ${{ steps.pages.outputs.base_path }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3

deploy:
runs-on: ubuntu-latest
needs: build

if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.event.repository.default_branch == github.ref_name)
concurrency:
group: "pages"
cancel-in-progress: true

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 264d9a5

Please sign in to comment.