Skip to content

Commit

Permalink
ENH: Add a GHA workflow file to build site on PRs (#22)
Browse files Browse the repository at this point in the history
Add a GHA workflow file to build the site when opening pull requests.

Add the deployment status badge to the `README` file.
  • Loading branch information
jhlegarreta authored Oct 12, 2023
1 parent a612c77 commit b7c177c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Jekyll site

on:
push:
branches: ['main']
pull_request:
branches: ['main']

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

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build
uses: actions/jekyll-build-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# slicerdmri.github.io

[![][deployment-img]][deployment-link]

[deployment-img]: https://github.com/SlicerDMRI/slicerdmri.github.io/actions/workflows/pages/pages-build-deployment/badge.svg
[deployment-link]: https://dmri.slicer.org/

SlicerDMRI organization website repository

# Build
Expand Down

0 comments on commit b7c177c

Please sign in to comment.