mirror of
https://github.com/penpot/penpot.git
synced 2026-11-18 16:12:24 +00:00
* ⬆️ Bump the JDK to 27.0.1.1 on devenv and the backend image The devenv image compiled the backend bundle with JDK 27 while the production image ran JDK 26. The runtime starts with --enable-preview, so a runtime line behind the compiler line is a silent trap rather than a working setup. Both pins now use Zulu 27.0.1.1 (zulu27.30.201-ca), the current GA of the line, with the same sums on both architectures. The jlink module list in the backend image still resolves on 27, so it does not change. Sums checked by downloading both tarballs; the jlink JRE built from them starts and reports 27.0.1.1. AI-assisted-by: deepseek-v4.1-flash * 🔥 Remove the unused gitpod setup No workflow built docker/gitpod and its AdoptOpenJDK 16 install no longer matches the devenv. The README badge linked to a setup that no longer exists, so it goes with it. The historical changelog entry stays: CHANGES.md is generated from the milestones. AI-assisted-by: deepseek-v4.1-flash * ⬆️ Bring the docker/ updates from develop Move the devenv and the production images to what develop already carries: - Base images to the current dhi.io digests. - Node 24.22.3 and pnpm 12.21.0 in the devenv image and in every production Dockerfile that ships pnpm. - Rust 1.99.0 and Serena 2.1.0, with SERENA_UPDATE_VERSION raised to match and a note that it must never be lower than the image pin. - tini as the exporter ENTRYPOINT. Devenv additions: PENPOT_DEVENV=true so the frontend compiles with the admin console disabled by default, xauth and libvulkan1 plus the GPU compose overlay, the MCP OAuth metadata route in nginx, and clipboard support in tmux. The JDK stays at 27.0.1.1 on both pins. AI-assisted-by: deepseek-v4.1-flash * ⬆️ Finish the Node 24.22.3 bump outside docker/ The docker/ import brought Node 24.22.3 into the devenv and the image tags while .nvmrc and the two plugins-deploy workflows stayed on 24.22.2. Node stays on the 24.x line on every site: the plugins-deploy runtime pins follow .nvmrc, even though develop moved them to node@26.13.1 in 99db795966. AI-assisted-by: deepseek-v4.1-flash
128 lines
4.0 KiB
YAML
128 lines
4.0 KiB
YAML
name: Plugins/api-doc deployer
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
- staging
|
|
- main
|
|
paths:
|
|
- 'plugins/libs/plugin-types/index.d.ts'
|
|
- 'plugins/libs/plugin-types/REAME.md'
|
|
- 'plugins/tools/typedoc.css'
|
|
- 'plugins/CHANGELOG.md'
|
|
- 'plugins/wrangler-penpot-plugins-api-doc.toml'
|
|
workflow_dispatch:
|
|
inputs:
|
|
gh_ref:
|
|
description: 'Name of the branch'
|
|
type: choice
|
|
required: true
|
|
default: 'develop'
|
|
options:
|
|
- develop
|
|
- staging
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Extract some useful variables
|
|
id: vars
|
|
env:
|
|
GH_REF: ${{ inputs.gh_ref || github.ref_name }}
|
|
run: |
|
|
echo "gh_ref=$GH_REF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
ref: ${{ steps.vars.outputs.gh_ref }}
|
|
|
|
# No dependency cache here: a deploy must not restore a cache that
|
|
# other workflows can write to.
|
|
- name: Setup pnpm + Node.js
|
|
uses: pnpm/setup@a0881977cd8ea73b1ed212236c99ca10dcc80cf4 # v3.1.1
|
|
with:
|
|
working-directory: plugins
|
|
runtime: node@24.22.3
|
|
install: false
|
|
|
|
- name: Install deps
|
|
working-directory: ./plugins
|
|
shell: bash
|
|
run: |
|
|
pnpm install --frozen-lockfile;
|
|
pnpm add -D -w wrangler@latest;
|
|
|
|
- name: Build docs
|
|
working-directory: plugins
|
|
shell: bash
|
|
run: pnpm run build:doc
|
|
|
|
- name: Select Worker name
|
|
env:
|
|
REF: ${{ steps.vars.outputs.gh_ref }}
|
|
run: |
|
|
case "$REF" in
|
|
main)
|
|
echo "WORKER_NAME=penpot-plugins-api-doc-pro" >> $GITHUB_ENV
|
|
echo "WORKER_URI=doc.plugins.penpot.app" >> $GITHUB_ENV ;;
|
|
staging)
|
|
echo "WORKER_NAME=penpot-plugins-api-doc-pre" >> $GITHUB_ENV
|
|
echo "WORKER_URI=doc.plugins.penpot.dev" >> $GITHUB_ENV ;;
|
|
develop)
|
|
echo "WORKER_NAME=penpot-plugins-api-doc-hourly" >> $GITHUB_ENV
|
|
echo "WORKER_URI=doc.plugins.hourly.penpot.dev" >> $GITHUB_ENV ;;
|
|
*) echo "Unsupported branch ${REF}" && exit 1 ;;
|
|
esac
|
|
|
|
- name: Set the custom url
|
|
working-directory: plugins
|
|
shell: bash
|
|
run: |
|
|
sed -i "s/WORKER_URI/${WORKER_URI}/g" wrangler-penpot-plugins-api-doc.toml
|
|
|
|
- name: Add noindex header and robots.txt files for non-production environments
|
|
if: ${{ steps.vars.outputs.gh_ref != 'main' }}
|
|
working-directory: plugins
|
|
shell: bash
|
|
run: |
|
|
ASSETS_DIR="dist/doc"
|
|
|
|
cat > "${ASSETS_DIR}/_headers" << 'EOF'
|
|
/*
|
|
X-Robots-Tag: noindex, nofollow
|
|
EOF
|
|
|
|
cat > "${ASSETS_DIR}/robots.txt" << 'EOF'
|
|
User-agent: *
|
|
Disallow: /
|
|
EOF
|
|
|
|
- name: Deploy to Cloudflare Workers
|
|
uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
|
|
with:
|
|
workingDirectory: plugins
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: deploy --config wrangler-penpot-plugins-api-doc.toml --name ${{ env.WORKER_NAME }}
|
|
|
|
- name: Notify Mattermost
|
|
if: failure()
|
|
uses: mattermost/action-mattermost-notify@ae31bb6f9e26a54336e79696f108a2c91cf55b4e # v2.1.0
|
|
with:
|
|
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }}
|
|
MATTERMOST_CHANNEL: bot-alerts-cicd
|
|
TEXT: |
|
|
❌ 🧩📚 *[PENPOT PLUGINS] Error deploying API documentation.*
|
|
📄 Triggered from ref: `${{ inputs.gh_ref }}`
|
|
🔗 Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
@infra
|