Skip to content

Build GitHub Pages with Jekyll #43

Build GitHub Pages with Jekyll

Build GitHub Pages with Jekyll #43

# Workflow checking if the documentation builds with Jekyll as expected
# Only used for checking if a pull request can be safely merged
name: Build GitHub Pages with Jekyll
on:
# Runs on pull requests targeting the default branch
pull_request:
types: [opened, edited, reopened, synchronize]
branches: ["main"]
# May also be started manually
workflow_dispatch:
# Runs automatically every first day of the month
schedule:
- cron: '0 12 1 * *'
jobs:
# Builds the GitHub pages and uploads the html files
build-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build With Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./docs/_site
# Upload only if started manually
- name: Upload Artifact
if: contains(fromJSON('["workflow_dispatch"]'), github.event_name)
uses: actions/upload-pages-artifact@v3
with:
name: docs_folder
path: ./docs/_site
if-no-files-found: error