mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 23:20:56 +01:00
feat(infrastructure): add frontend, deploy to cloudflare
This commit is contained in:
9
.github/workflows/frontend-pages.yml
vendored
9
.github/workflows/frontend-pages.yml
vendored
@@ -128,6 +128,15 @@ jobs:
|
|||||||
echo "project_name=$PNAME" >> $GITHUB_OUTPUT
|
echo "project_name=$PNAME" >> $GITHUB_OUTPUT
|
||||||
echo "branch=$PBRANCH" >> $GITHUB_OUTPUT
|
echo "branch=$PBRANCH" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Ensure Cloudflare Pages project exists
|
||||||
|
env:
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
PNAME: ${{ steps.pname.outputs.project_name }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
npx wrangler pages project create "$PNAME" --production-branch=main || true
|
||||||
|
|
||||||
- name: Deploy using Cloudflare Wrangler
|
- name: Deploy using Cloudflare Wrangler
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user