Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47e1734917 | |||
| 307dffd3a7 | |||
| 46f78b42dc | |||
| d0c278ea1b |
@@ -34,7 +34,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-and-push]
|
needs: [build-and-push]
|
||||||
steps:
|
steps:
|
||||||
- uses: shcizo/package-updater-action@v1
|
- uses: https://gitea.shcizo.se/shcizo/package-updater-action@v1
|
||||||
with:
|
with:
|
||||||
endpoint: https://updater.shcizo.se/update
|
endpoint: https://updater.shcizo.se/update
|
||||||
image: gitea.shcizo.se/shcizo/pdga-rating
|
image: gitea.shcizo.se/shcizo/pdga-rating
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ PDGA rating scraper and display app. Scrapes player ratings and course data from
|
|||||||
- **Frontend:** HTMX + vanilla JS (in `public/js/`)
|
- **Frontend:** HTMX + vanilla JS (in `public/js/`)
|
||||||
- **Scraping:** Puppeteer (with stealth plugin) + direct HTTP
|
- **Scraping:** Puppeteer (with stealth plugin) + direct HTTP
|
||||||
- **Logging:** Pino (JSON in production, pino-pretty in dev)
|
- **Logging:** Pino (JSON in production, pino-pretty in dev)
|
||||||
- **CI/CD:** Gitea Actions (tag-triggered docker build/push to `gitea.shcizo.se/shcizo/pdga-rating`)
|
- **CI/CD:** Gitea Actions (tag-triggered build + push + deploy via `.gitea/workflows/deploy.yml`)
|
||||||
|
|
||||||
## Project Structure
|
## Project Structure
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ public/
|
|||||||
- **Logging:** Use `require('./logger')` (or relative path). Never use `console.log/error` in backend code. Use appropriate Pino levels: `debug` for verbose/diagnostic data, `info` for operational status, `warn` for retries/degraded state, `error` for failures, `fatal` for startup crashes.
|
- **Logging:** Use `require('./logger')` (or relative path). Never use `console.log/error` in backend code. Use appropriate Pino levels: `debug` for verbose/diagnostic data, `info` for operational status, `warn` for retries/degraded state, `error` for failures, `fatal` for startup crashes.
|
||||||
- **Frontend JS:** `console.error` is fine in `public/js/` — runs in browser, no Pino.
|
- **Frontend JS:** `console.error` is fine in `public/js/` — runs in browser, no Pino.
|
||||||
- **Commits:** Conventional commits (`feat:`, `fix:`, `refactor:`, `chore:`, `ci:`).
|
- **Commits:** Conventional commits (`feat:`, `fix:`, `refactor:`, `chore:`, `ci:`).
|
||||||
- **Releases:** Manual version bump — edit `version` in `package.json` + `package-lock.json`, commit as `<version>`, tag `v<version>`, push commit + tag (`git push origin main v<version>`). Triggers `.gitea/workflows/docker-build.yml` which builds and pushes the image. Auth uses repo secret `PACKAGES_TOKEN` (PAT with `write:package`) — the auto-injected `GITEA_TOKEN` does not have effective registry access.
|
- **Releases:** Manual version bump — edit `version` in `package.json` + `package-lock.json`, commit as `<version>`, tag `v<version>`, push commit + tag (`git push origin main v<version>`). Triggers `.gitea/workflows/deploy.yml` which (1) builds and pushes the image to `gitea.shcizo.se/shcizo/pdga-rating:<tag>` + `:latest`, then (2) calls `package-updater-action` against `updater.shcizo.se/update` to roll out the new image. Required secrets: `PACKAGES_TOKEN` (PAT with `write:package`, for registry auth — the auto-injected `GITEA_TOKEN` does not have effective registry access) and `UPDATER_API_KEY` (for the updater endpoint). The action repo `shcizo/package-updater-action` is referenced via full Gitea URL (`https://gitea.shcizo.se/...`) since `uses:` defaults to GitHub.
|
||||||
- **Scraping:** Two strategies per entity: direct HTTP (fast, preferred) with Puppeteer fallback (stealth plugin for anti-bot). Rate limiting must be respected.
|
- **Scraping:** Two strategies per entity: direct HTTP (fast, preferred) with Puppeteer fallback (stealth plugin for anti-bot). Rate limiting must be respected.
|
||||||
- **Database:** Migrations run automatically on startup in `db.js`. Schema changes go there.
|
- **Database:** Migrations run automatically on startup in `db.js`. Schema changes go there.
|
||||||
- **Templates:** EJS with shared layout in `views/partials/`. Pages use HTMX for dynamic content loading.
|
- **Templates:** EJS with shared layout in `views/partials/`. Pages use HTMX for dynamic content loading.
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "pdga-ratings",
|
"name": "pdga-ratings",
|
||||||
"version": "1.2.5",
|
"version": "1.2.7",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pdga-ratings",
|
"name": "pdga-ratings",
|
||||||
"version": "1.2.5",
|
"version": "1.2.7",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ejs": "^4.0.1",
|
"ejs": "^4.0.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pdga-ratings",
|
"name": "pdga-ratings",
|
||||||
"version": "1.2.5",
|
"version": "1.2.7",
|
||||||
"description": "PDGA rating scraper and display",
|
"description": "PDGA rating scraper and display",
|
||||||
"main": "server.js",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user