Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
name: Release Docs
on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
- 15.x.x
workflow_dispatch:
inputs:
BASELINE:
description: 'Baseline branch of documentation'
required: true
default: '15.x.x'
TARGET_FOLDER:
description: 'Target version folder'
required: true
default: 'next'
type: choice
options:
- 'v15'
- 'next'

env:
TARGET_PATH: v15

jobs:
build-docs:
Expand All @@ -16,13 +27,24 @@ jobs:
if: github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && contains(join(github.event.pull_request.labels.*.name, ', '), 'release-docs'))
steps:
- uses: actions/checkout@v3
- name: Process input parameters
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
TARGET_PATH="${{ github.event.inputs.TARGET_FOLDER }}"
else
TARGET_PATH="v15"
fi
echo "TARGET_PATH=$TARGET_PATH" >> "$GITHUB_ENV"
BASELINE_BRANCH=${{ github.event.inputs.BASELINE || github.ref }}
echo "BASELINE_BRANCH=${BASELINE_BRANCH#refs/heads/}" >> "$GITHUB_ENV"

- uses: actions/checkout@v4
with:
ref: 15.x.x
ref: ${{ env.BASELINE_BRANCH }}
fetch-depth: 0

- name: Bundler Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ versions:
- url: /docs/v15
title: 15.x.x
selected: true
- url: /docs/next
title: next
selected: false

page_excerpts: true

Expand Down
Loading