Skip to content

Single aggregate docs website with MultiDocumenter #15

Single aggregate docs website with MultiDocumenter

Single aggregate docs website with MultiDocumenter #15

Workflow file for this run

# Builds a draft version of the Jekyll site for pull requests and deploys it to
# https://sienna-platform.github.io/Sienna/pr-preview/pr-<number>/
# Preview URL is in the job summary (click the job in the Actions tab). Requires Settings > Pages > Deploy from branch (gh-pages)
# and Settings > Actions > Workflow permissions: Read and write.
name: Jekyll PR preview
on:
pull_request:
types: [opened, reopened, synchronize, closed]
concurrency: preview-${{ github.ref }}
permissions:
contents: write
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Julia
if: github.event.action != 'closed'
uses: julia-actions/setup-julia@v1
with:
version: '1.11'
- name: Setup Ruby
if: github.event.action != 'closed'
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
cache-version: 0
- name: Install dependencies
if: github.event.action != 'closed'
run: julia --project=SiennaDocs/docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"SiennaDocs"))); Pkg.instantiate()'
- name: Build Documenter.jl docs
if: github.event.action != 'closed'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
SIENNA_DOCS_ROOTPATH: "/Sienna/pr-preview/pr-${{ github.event.number }}/SiennaDocs/docs/build"
run: julia --project=SiennaDocs/docs --color=yes SiennaDocs/docs/make.jl
- name: Build with Jekyll
if: github.event.action != 'closed'
run: bundle exec jekyll build --baseurl "/Sienna/pr-preview/pr-${{ github.event.number }}"
env:
JEKYLL_ENV: production
- name: Deploy preview
if: github.event.action != 'closed'
id: preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _site
preview-branch: gh-pages
comment: false
qr-code: false
action: deploy
- name: Preview URL
if: github.event.action != 'closed' && steps.preview.outputs.deployment-action == 'deploy'
run: |
echo "## PR preview deployed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Preview:** ${{ steps.preview.outputs.preview-url }}" >> $GITHUB_STEP_SUMMARY
- name: Remove preview
if: github.event.action == 'closed'
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _site
preview-branch: gh-pages
action: remove