Skip to content

Commit

Permalink
feat: Deploy to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Jan 1, 2025
1 parent df6b0a0 commit caa6a63
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: build-website
name: Deploy Jekyll site to Pages
on:
push:
branches:
- $default-branch
pull_request:
branches:
- $default-branch

# 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: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: "pages"
cancel-in-progress: false

jobs:
jekyll:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
branch: [training-slicer-org]
steps:
- name: 📂 setup
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -42,17 +44,31 @@ jobs:
with:
ruby-version: 3.2 # can change this to 2.7 or whatever version you prefer

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

# See https://github.com/marketplace/actions/jekyll-action-ts
- name: 🔨 install dependencies & build site
uses: limjh16/jekyll-action-ts@807a5f09755d777bfd3070e9505d02347844c9b2 # v2
with:
enable_cache: true
custom_opts: '-d _site --config slicer-org/_config.yml,_config_training.yml'
custom_opts: '-d _site --config slicer-org/_config.yml,_config_training.yml --baseurl "${{ steps.pages.outputs.base_path }}"'
jekyll_src: slicer-org
jekyll_env: production

- name: 'Upload website build'
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: ${{ matrix.branch }}-website-build
path: ./_site
retention-days: 1
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3

# Deployment job
# deploy:
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-24.04
# needs: build
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v4

0 comments on commit caa6a63

Please sign in to comment.