Skip to content

Deploy Jekyll site to Pages #1

Deploy Jekyll site to Pages

Deploy Jekyll site to Pages #1

Workflow file for this run

name: build-website-preview
on:
push:
branches:
- $default-branch
pull_request:
branches:
- $default-branch
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
jekyll:
runs-on: ubuntu-latest
strategy:
matrix:
branch: [training-slicer-org]
steps:
- name: πŸ“‚ setup
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: πŸ“‚ setup slicer-org
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: Slicer/slicer.org
path: slicer-org
- name: πŸ”¨ Prepare
run: |
cp training.markdown slicer-org/ && \
cp index.markdown slicer-org/ && \
cp _data/tutorials.yml slicer-org/_data/ && \
cp assets/img/* slicer-org/assets/img/
- name: πŸ’Ž setup ruby
uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf # v1.204.0
with:
ruby-version: 3.2 # can change this to 2.7 or whatever version you prefer
# 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'
jekyll_src: slicer-org
- name: 'Upload website build'
if: matrix.branch != 'deploy-download-preview'
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: ${{ matrix.branch }}-website-build
path: ./_site
retention-days: 1