mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
Move the backend JDK to its latest maintenance build within Java 26 and refresh the dependency versions pinned by hand in the development and production images. - Backend: Zulu JDK 26.0.2 to 26.0.2.1. The jlink module list keeps jdk.management, so the prometheus process metrics stay exported. - Node.js 24.22.1 in .nvmrc, the development image tarball and the two plugins deploy workflows that pin it. - pnpm 12.15.0 in the four Dockerfiles, the 34 packageManager fields and the eleven lockfiles. - Development tools: clj-kondo 2026.10.20, Babashka 1.13.226, Pixi 0.83.0, GitHub CLI 2.103.0, AWS CLI 2.38.5 and uv 0.13.5. - Infra services: RustFS 1.0.3, Mailpit v1.32.0, and Valkey pinned to 8.1.10 instead of the floating 8.1 tag. Fix SERENA_UPDATE_VERSION in the compose file. A value there makes the start script reinstall that Serena release on every start, overriding the one baked into the image; it was replacing 1.7.0 with 1.6.1. The hardened base image updates are left to Renovate. Closes #12599 AI-assisted-by: deepseek-v4.1-flash Signed-off-by: Andrey Antukh <niwi@niwi.nz>
126 lines
4.0 KiB
YAML
126 lines
4.0 KiB
YAML
name: Plugins/styles-doc deployer
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
- staging
|
|
- main
|
|
paths:
|
|
- 'plugins/apps/example-styles/**'
|
|
- 'plugins/libs/plugins-styles/**'
|
|
- 'plugins/wrangler-penpot-plugins-styles-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.1
|
|
install: false
|
|
|
|
- name: Install deps
|
|
working-directory: ./plugins
|
|
shell: bash
|
|
run: |
|
|
pnpm install --frozen-lockfile;
|
|
pnpm add -D -w wrangler@latest;
|
|
|
|
- name: Build styles
|
|
working-directory: plugins
|
|
shell: bash
|
|
run: pnpm run build:styles-example
|
|
|
|
- name: Select Worker name
|
|
env:
|
|
REF: ${{ steps.vars.outputs.gh_ref }}
|
|
run: |
|
|
case "$REF" in
|
|
main)
|
|
echo "WORKER_NAME=penpot-plugins-styles-doc-pro" >> $GITHUB_ENV
|
|
echo "WORKER_URI=styles-doc.plugins.penpot.app" >> $GITHUB_ENV ;;
|
|
staging)
|
|
echo "WORKER_NAME=penpot-plugins-styles-doc-pre" >> $GITHUB_ENV
|
|
echo "WORKER_URI=styles-doc.plugins.penpot.dev" >> $GITHUB_ENV ;;
|
|
develop)
|
|
echo "WORKER_NAME=penpot-plugins-styles-doc-hourly" >> $GITHUB_ENV
|
|
echo "WORKER_URI=styles-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-styles-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/apps/example-styles"
|
|
|
|
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-styles-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 Styles documentation.*
|
|
📄 Triggered from ref: `${{ inputs.gh_ref }}`
|
|
🔗 Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
@infra
|