Skip to content

Commit

Permalink
Run pages build on PRs that touch docs. (#378)
Browse files Browse the repository at this point in the history
Should help notice bugs like #376#377.

Follows from
- #377 

Along the way to solving
- #363
  • Loading branch information
samcunliffe authored Jun 4, 2024
1 parent c9ca3fb commit b918e01
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages

on:
# Run on merges to main branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
# Run on any PRs that touch the docs directory
pull_request:
paths:
- docs/**

# Run manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand Down Expand Up @@ -48,9 +48,7 @@ jobs:
- name: Build with Jekyll
working-directory: docs
# Outputs to the './_site' directory by default
run:
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path
}}"
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
Expand All @@ -61,6 +59,7 @@ jobs:

# Deployment job
website-deploy:
if: github.ref == 'refs/heads/main' # only deploy from main
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit b918e01

Please sign in to comment.