Skip to content

Commit

Permalink
Made the workflow callable
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Nov 30, 2024
1 parent d3b9363 commit 0d25192
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/preview_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
pull_request:
paths:
- 'docs/**.md'
workflow_call:
inputs:
project:
description: 'The project to build (dev doc, user doc)'
default: ''
required: false
type: string

jobs:
post-preview-links:
Expand All @@ -22,7 +29,7 @@ jobs:
run: |
set -x #debug
file_limit=100
build_url="https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/en/${{ github.event.pull_request.number }}/"
build_url="https://ez-systems-developer-documentation--${{ github.event.pull_request.number }}.com.readthedocs.build/${{inputs.project}}en/${{ github.event.pull_request.number }}/"
changed_files=$(git diff --name-only HEAD "origin/$GITHUB_BASE_REF" | grep -E ".md$" || [[ $? == 1 ]])
number_of__changed_files=$(echo "$changed_files" | wc -l)
Expand Down

0 comments on commit 0d25192

Please sign in to comment.