forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.91 KB
/
Copy pathembed-renderer.yml
File metadata and controls
59 lines (50 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Embed renderer
# Deploys the embed renderer to public.ghostembeds.com, which serves
# self-hosted Ghost. See .github/embed-renderer/README.md.
on:
push:
branches: [main]
paths:
- 'koenig/koenig-lexical/public/embed-renderer/**'
- '.github/embed-renderer/**'
- '.github/workflows/embed-renderer.yml'
workflow_dispatch:
permissions:
contents: read
env:
NODE_VERSION: 22.23.3
concurrency:
group: embed-renderer
cancel-in-progress: false
jobs:
deploy:
name: Deploy public renderer
runs-on: ubuntu-latest
if: github.repository == 'TryGhost/Ghost'
steps:
- name: Checkout repo
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
install: 'false'
store-cache: 'false'
# every version ships on every deploy: a Netlify deploy replaces the site,
# and editors request the renderer version they were built against
- name: Build upload directory
run: .github/embed-renderer/build.sh "$RUNNER_TEMP/embed-renderer"
# --ignore-scripts: a static --no-build deploy needs none of netlify-cli's
# dependency build scripts, which pnpm otherwise refuses to skip.
# Runs outside the checkout: from the repo root netlify-cli sees the pnpm
# workspace and refuses to deploy until one of its packages is picked
- name: Deploy to Netlify
working-directory: ${{ runner.temp }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_EMBEDS_PUBLIC_SITE_ID }}
run: |
pnpm --ignore-scripts --package=netlify-cli@27.8.0 dlx netlify deploy \
--prod \
--no-build \
--dir="$RUNNER_TEMP/embed-renderer" \
--message "${GITHUB_SHA:0:7} via ${GITHUB_WORKFLOW}"