Deploy Jekyll site to Pages #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |