Skip to content

Bump actions/checkout from 1 to 4 (#34) #135

Bump actions/checkout from 1 to 4 (#34)

Bump actions/checkout from 1 to 4 (#34) #135

name: TransformSpecifications.jl - Documentation
on:
workflow_dispatch:
push:
tags: ['*']
branches:
- main
paths:
- '.github/workflows/TransformSpecifications_docs.yml'
- 'docs/**'
- 'src/**'
- 'Project.toml'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '.github/workflows/TransformSpecifications_docs.yml'
- 'docs/**'
- 'src/**'
- 'Project.toml'
jobs:
Documentation:
# Run on push's or non-draft PRs
if: (github.event_name == 'push') || (github.event.pull_request.draft == false)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 1.8
- uses: julia-actions/cache@v1
with:
cache-name: "${{ github.workflow }}-${{ github.job }}-${{ matrix.runs-on }}"
cache-compiled: true
- name: Install dependencies
run: |
julia --project=docs/ -e 'using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- run: julia --project=docs "docs/make.jl"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
PYTHON: ""
- name: TransformSpecifications.jl doc preview URL
if: github.event_name == 'pull_request'
run: |
owner="${GITHUB_REPOSITORY_OWNER}"
repo="${GITHUB_REPOSITORY#*/}"
pr="${{ github.event.number }}"
echo "https://${owner}.github.io/${repo}/previews/PR${pr}/"