Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: Deploy to GitHub Pages

# The site is plain static files, so there's nothing to build — this just
# uploads the repo and deploys it. It replaces the legacy branch-based
# builder, which queues on shared infrastructure and offers no progress.
# The site is rendered into a folder of static files, then that folder is
# uploaded and deployed - the same shape as before, with one build step in
# front of the upload. The build reads this repository's own files: the
# news the Ruby build rendered, the manual, the themes page, the assets,
# the installer scripts. Nothing is fetched from the network to build the
# site; the plugin catalogue is a committed snapshot refreshed on its own
# schedule (see refresh-content.yml).

on:
push:
Expand Down Expand Up @@ -30,11 +34,26 @@ jobs:
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: npm ci

# port the site's files -> render every page -> lay the site's own
# static files over the result. dist/client is the whole site.
- run: npm run build

- uses: actions/configure-pages@v6

- uses: actions/upload-pages-artifact@v5
with:
path: .
path: dist/client
include-hidden-files: true

- id: deployment
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/refresh-content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Keeps the plugin catalogue current without anyone running the importer by
# hand. Everything else the site shows comes from this repository's own
# files and needs no refreshing: the news the Ruby build renders, the manual
# the bot regenerates, the themes page contributors edit, the assets. The
# catalogue and the similarity map derived from it come from the marketplace
# repository, and the release version from the OS repository's releases, so
# they are fetched here on a schedule and committed.
#
# A commit pushed with the workflow's own token does not trigger other
# workflows - GitHub stops workflows from setting each other off by
# accident - so a refresh that only pushed would sit in git undeployed until
# the next human push. This one asks the deploy to run, explicitly, after it
# has pushed.
name: Refresh plugin catalogue

on:
schedule:
# Every six hours, off the top of the hour to stay clear of the crowd.
- cron: '17 */6 * * *'
workflow_dispatch:

permissions:
contents: write
actions: write

concurrency:
group: refresh-content
cancel-in-progress: false

jobs:
refresh:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- run: npm ci

- name: Refresh the catalogue, the similarity map and the release
run: npm run refresh-data

- name: Commit what changed
run: |
git add src/data public/data
if git diff --cached --quiet; then
echo "Nothing changed upstream."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Refresh the plugin catalogue" \
-m "$(git diff --cached --stat | tail -1)"
git pull --rebase origin "${GITHUB_REF_NAME}"
git push origin HEAD:"${GITHUB_REF_NAME}"
echo "changed=true" >> "$GITHUB_OUTPUT"
id: commit

- name: Deploy what changed
if: steps.commit.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run pages.yml --ref "${GITHUB_REF_NAME}"
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
.idea/
.claude/
node_modules
.DS_Store
dist
dist-ssr
*.local
.env
.nitro
.tanstack
.wrangler
.output
.vinxi
__unconfig*
todos.json
__pycache__/
.vscode/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package-lock.json
pnpm-lock.yaml
yarn.lock
25 changes: 25 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "base-nova",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"iconLibrary": "lucide",
"rtl": false,
"menuColor": "default",
"menuAccent": "subtle",
"registries": {}
}
20 changes: 20 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// @ts-check

import { tanstackConfig } from '@tanstack/eslint-config'

export default [
...tanstackConfig,
{
rules: {
'import/no-cycle': 'off',
'import/order': 'off',
'sort-imports': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/require-await': 'off',
'pnpm/json-enforce-catalog': 'off',
},
},
{
ignores: ['eslint.config.js', 'prettier.config.js'],
},
]
Loading