Skip to content
Merged
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
26 changes: 11 additions & 15 deletions .github/workflows/pages.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
group: deploy
cancel-in-progress: false

jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,15 +25,13 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm app:build
- uses: actions/upload-pages-artifact@v3
# Needs repository secrets CLOUDFLARE_API_TOKEN (Workers Scripts: Edit) and
# CLOUDFLARE_ACCOUNT_ID; without them the build still runs but nothing is deployed.
- name: Deploy to Cloudflare Workers
env:
HAS_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN != '' }}
if: env.HAS_TOKEN == 'true'
uses: cloudflare/wrangler-action@v3
with:
path: app-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@v4
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
dist/
app-dist/
*.tgz
.wrangler/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pnpm test # núcleo con pruebas / tested core (vitest)
pnpm build # dist/
pnpm enzymes # regenerar el catálogo desde REBASE / rebuild the catalogue from REBASE
pnpm app:dev # app independiente / standalone app (vector-editor.oquinterol.com)
pnpm app:deploy # Cloudflare Worker (wrangler): vector-editor.oquinterol.com
```

## Se apoya en / Builds on
Expand Down
1 change: 0 additions & 1 deletion app/public/CNAME

This file was deleted.

8 changes: 8 additions & 0 deletions app/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()
X-Frame-Options: SAMEORIGIN

/assets/*
Cache-Control: public, max-age=31536000, immutable
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"typecheck": "tsc --noEmit",
"enzymes": "node scripts/build-enzymes.mjs",
"app:dev": "vite",
"app:build": "vite build"
"app:build": "vite build",
"app:deploy": "pnpm app:build && wrangler deploy"
},
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
Expand Down
14 changes: 14 additions & 0 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Static app served by a Cloudflare Worker at vector-editor.oquinterol.com.
"$schema": "node_modules/wrangler/config-schema.json",
"name": "vector-editor",
// Oaql97@gmail.com account (owner of the oquinterol.com zone).
"account_id": "1334cd1c58712e97ee632f6507e4c659",
"compatibility_date": "2026-10-01",
"assets": {
"directory": "./app-dist",
"not_found_handling": "single-page-application"
},
"routes": [{ "pattern": "vector-editor.oquinterol.com", "custom_domain": true }],
"observability": { "enabled": true }
}
Loading