mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 06:57:47 +01:00
fix(infrastructure): use correct runner
This commit is contained in:
18
.github/workflows/frontend-pages.yml
vendored
18
.github/workflows/frontend-pages.yml
vendored
@@ -15,6 +15,10 @@ on:
|
||||
description: 'Cloudflare Pages project name (overrides default)'
|
||||
required: false
|
||||
type: string
|
||||
backend_url_scheme:
|
||||
description: 'The full scheme URL for the backend (e.g., https://api.example.com)'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
CLOUDFLARE_API_TOKEN:
|
||||
required: true
|
||||
@@ -26,17 +30,9 @@ on:
|
||||
value: ${{ jobs.deploy.outputs.deployed_url }}
|
||||
|
||||
jobs:
|
||||
get_urls:
|
||||
uses: ./.github/workflows/url_generator.yml
|
||||
with:
|
||||
mode: ${{ inputs.mode }}
|
||||
pr_number: ${{ inputs.pr_number }}
|
||||
secrets: inherit
|
||||
|
||||
build:
|
||||
name: Build frontend
|
||||
runs-on: ubuntu-latest
|
||||
needs: [get_urls]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: 7project/frontend
|
||||
@@ -54,9 +50,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Set backend URL from url_generator
|
||||
- name: Set backend URL from workflow input
|
||||
run: |
|
||||
echo "VITE_BACKEND_URL=${{ needs.get_urls.outputs.backend_url_scheme }}" >> $GITHUB_ENV
|
||||
echo "VITE_BACKEND_URL=${{ inputs.backend_url_scheme }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
@@ -136,4 +132,4 @@ jobs:
|
||||
else
|
||||
URL="https://${PBRANCH}.${PNAME}.pages.dev"
|
||||
fi
|
||||
echo "deployed_url=$URL" >> $GITHUB_OUTPUT
|
||||
echo "deployed_url=$URL" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user