Skip to content

Commit

Permalink
Changes to Jekyll CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut authored Dec 4, 2024
1 parent e70fba3 commit a28411e
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,65 @@
name: Jekyll site CI
name: Deploy Jekyll site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
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:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}

- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: '3.3'
bundler-cache: true
cache-version: 0

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

uses: actions/configure-pages@v3
- name: Install dependencies
run: |
bundle install
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: |
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
PAGES_REPO_NWO: ${{ github.repository }}
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
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v2

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 }}

runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v2

0 comments on commit a28411e

Please sign in to comment.