Skip to content

Merge pull request #27 from block/update/component-pages #13

Merge pull request #27 from block/update/component-pages

Merge pull request #27 from block/update/component-pages #13

Workflow file for this run

name: Deploy Ghost UI to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build registry
run: pnpm --filter @ghost/ui build:registry
- name: Build Ghost UI
run: pnpm --filter @ghost/ui build
env:
VITE_BASE_PATH: /ghost/
- name: Copy index.html to 404.html for SPA routing
run: cp packages/ghost-ui/dist/index.html packages/ghost-ui/dist/404.html
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: packages/ghost-ui/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5