From 88243e97d1c4e1050b57d9063d14e1a934d5c70c Mon Sep 17 00:00:00 2001 From: Mustafa Turhan Date: Fri, 9 Jan 2026 17:11:53 +0300 Subject: [PATCH 1/2] introduce more workflow updates --- .github/workflows/deploy.yml | 12 +++++++++--- .github/workflows/playwright.yml | 2 +- .github/workflows/preview-build.yml | 1 + .github/workflows/preview-deploy.yml | 26 ++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cd3a7928..57f1275d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,17 +10,23 @@ on: - 'docker*' - 'Docker*' +concurrency: + group: deploy-production + cancel-in-progress: false + jobs: deploy: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' + cache: 'npm' - name: 🔧 Create build run: | - npm install + npm ci npm run build - name: 🚀 Deploy run: | diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 0a217552..ecacc663 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -31,4 +31,4 @@ jobs: with: name: playwright-report path: playwright-report/ - retention-days: 30 + retention-days: 1 diff --git a/.github/workflows/preview-build.yml b/.github/workflows/preview-build.yml index 5febd551..7a0595a2 100644 --- a/.github/workflows/preview-build.yml +++ b/.github/workflows/preview-build.yml @@ -25,6 +25,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: '20.x' + cache: 'npm' - name: 🔧 Install and build run: | diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml index a6966864..ea2cf250 100644 --- a/.github/workflows/preview-deploy.yml +++ b/.github/workflows/preview-deploy.yml @@ -64,6 +64,32 @@ jobs: context: 'PR Preview Deploy' }); + - name: ❌ Update PR status on failure + if: failure() + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = parseInt('${{ steps.pr.outputs.number }}'); + if (!prNumber) { + console.log('PR number not available, skipping status update'); + return; + } + const { data: pr } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber + }); + await github.rest.repos.createCommitStatus({ + owner: context.repo.owner, + repo: context.repo.repo, + sha: pr.head.sha, + state: 'failure', + target_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`, + description: 'Preview deployment failed', + context: 'PR Preview Deploy' + }); + - name: 🌐 Comment preview URL uses: actions/github-script@v7 with: From d427139c21768748fe3b64f8bd083854ec4f6740 Mon Sep 17 00:00:00 2001 From: Mustafa Turhan Date: Fri, 9 Jan 2026 17:20:04 +0300 Subject: [PATCH 2/2] update package.json to include more metadata --- package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ece78f7f..9e23ddbb 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,14 @@ { "name": "valhalla-web", "version": "1.0.0", + "description": "Web interface for Valhalla routing engine", "private": false, + "license": "MIT", "homepage": "https://valhalla.openstreetmap.de", + "repository": { + "type": "git", + "url": "https://github.com/valhalla/web-app" + }, "type": "module", "scripts": { "dev": "vite", @@ -17,7 +23,7 @@ "lint": "eslint .", "prettier": "prettier --write \"**/*.{json,md,scss,yaml,yml,js,jsx,ts,tsx}\"", "prettier:check": "prettier --check \"**/*.{json,md,scss,yaml,yml,js,jsx,ts,tsx}\"", - "check": "yarn prettier:check && yarn lint", + "check": "npm run prettier:check && npm run lint", "typecheck": "tsc --noEmit", "deploy": "gh-pages -d build", "prepare": "husky",