Skip to content

Docs

Docs #156

Workflow file for this run

name: Docs
on:
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
inputs:
version-number:
type: string
description: What is the new version number (ex. v0.28.0) for the website? If updating dev, leave this blank.
default: master
required: false
permissions:
id-token: write
contents: read
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout DJL Repo
uses: actions/checkout@v4
- name: Update versions.json
env:
NEW_VERSION: '${{ github.event.inputs.version-number }}'
run: |
DUPLICATE=$(jq --arg v "$NEW_VERSION" 'any(.version == $v)' versions.json)
if [ "$DUPLICATE" = "true" ]; then
echo "Version $NEW_VERSION already exists. Skipping update."
echo "duplicate=true" >> $GITHUB_OUTPUT
else
jq --arg v "$NEW_VERSION" '([{"version": $v, "title": $v, "aliases": []}] + .)' versions.json > temp.json && mv temp.json versions.json
echo "duplicate=false" >> $GITHUB_OUTPUT
fi
- name: Upload versions.json as artifact
uses: actions/upload-artifact@v3
with:
name: versions-json
path: versions.json
if-no-files-found: error