35 lines
969 B
YAML
35 lines
969 B
YAML
name: Build & Deploy
|
|
|
|
# Läuft automatisch bei jedem Push auf main — also auch dann, wenn VanVan (oder ich) im
|
|
# Adminbereich (/admin/) etwas ändert und Sveltia CMS das direkt als Commit ins Repo schreibt.
|
|
# So werden Änderungen ohne manuellen Schritt live auf https://vans-diy-bastelbedarf.pages.dev.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
deployments: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
|
|
|
- name: Deploy to Cloudflare Pages
|
|
uses: cloudflare/wrangler-action@v3
|
|
with:
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
command: pages deploy dist --project-name=vans-diy-bastelbedarf --branch=main
|