mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
# Description of Changes <!-- Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --> --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have run `task check` to verify linters, typechecks, and tests pass - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details.
96 lines
3.0 KiB
YAML
96 lines
3.0 KiB
YAML
name: Sync Portal Docs
|
|
|
|
# Regenerates the portal Developer Docs manifest from the Stirling docs repo and
|
|
# opens a PR when it changes. Runs weekly, on manual dispatch, or when the docs
|
|
# repo fires a `docs-updated` repository_dispatch.
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * 1"
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: "Docs repo ref (branch or tag) to sync from"
|
|
required: false
|
|
default: "main"
|
|
repository_dispatch:
|
|
types: [docs-updated]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync:
|
|
name: Sync docs manifest
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Setup GitHub App Bot
|
|
id: setup-bot
|
|
uses: ./.github/actions/setup-bot
|
|
with:
|
|
app-id: ${{ secrets.GH_APP_ID }}
|
|
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install frontend dependencies
|
|
working-directory: frontend
|
|
env:
|
|
NPM_CONFIG_IGNORE_SCRIPTS: "true"
|
|
run: npm ci --ignore-scripts --audit=false --fund=false
|
|
|
|
- name: Regenerate docs manifest
|
|
working-directory: frontend
|
|
env:
|
|
DOCS_REF: ${{ github.event.inputs.ref || github.event.client_payload.ref || 'main' }}
|
|
GITHUB_TOKEN: ${{ steps.setup-bot.outputs.token }}
|
|
run: npm run docs:sync
|
|
|
|
- name: Create Pull Request
|
|
id: cpr
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
token: ${{ steps.setup-bot.outputs.token }}
|
|
commit-message: "Sync portal docs from docs repo"
|
|
committer: ${{ steps.setup-bot.outputs.committer }}
|
|
author: ${{ steps.setup-bot.outputs.committer }}
|
|
signoff: true
|
|
branch: sync-portal-docs
|
|
base: main
|
|
title: "Sync portal docs from docs repo"
|
|
body: |
|
|
Auto-generated by ${{ steps.setup-bot.outputs.app-slug }}[bot].
|
|
|
|
Regenerates `frontend/editor/src/portal/generated/docsManifest.json`
|
|
from the Stirling docs repo via `npm run docs:sync`.
|
|
labels: |
|
|
Documentation
|
|
github-actions
|
|
Front End
|
|
add-paths: frontend/editor/src/portal/generated/docsManifest.json
|
|
delete-branch: true
|
|
sign-commits: true
|