The Svelte 5 SSG Migration #1
14
.woodpecker/build.yaml
Normal file
14
.woodpecker/build.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# PR pipeline: lint, build, test on the branch (separate steps, shared workspace).
|
||||||
|
# Runs when a pull request is opened or updated.
|
||||||
|
# Does not build Docker image or deploy.
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:20-alpine
|
||||||
|
commands:
|
||||||
|
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||||
|
- pnpm run build
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
@@ -6,17 +6,7 @@ when:
|
|||||||
event: [push, tag, manual]
|
event: [push, tag, manual]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-test
|
- name: 'Docker image build'
|
||||||
image: node:20-alpine
|
|
||||||
commands:
|
|
||||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
|
||||||
- pnpm install --frozen-lockfile || pnpm install
|
|
||||||
- pnpm run lint
|
|
||||||
- pnpm run lint:css
|
|
||||||
- pnpm run build
|
|
||||||
- pnpm test
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
environment:
|
environment:
|
||||||
REGISTRY_REPO: git.mifi.dev/mifi-ventures/landing
|
REGISTRY_REPO: git.mifi.dev/mifi-ventures/landing
|
||||||
@@ -36,9 +26,11 @@ steps:
|
|||||||
.
|
.
|
||||||
- echo "✓ Docker image built successfully"
|
- echo "✓ Docker image built successfully"
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-and-test
|
- lint
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
- name: push
|
- name: 'Push to registry'
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
environment:
|
environment:
|
||||||
REGISTRY_URL: git.mifi.dev
|
REGISTRY_URL: git.mifi.dev
|
||||||
@@ -62,9 +54,9 @@ steps:
|
|||||||
- docker push $REGISTRY_REPO:latest
|
- docker push $REGISTRY_REPO:latest
|
||||||
- echo "✓ Images pushed successfully"
|
- echo "✓ Images pushed successfully"
|
||||||
depends_on:
|
depends_on:
|
||||||
- build
|
- 'Docker image build'
|
||||||
|
|
||||||
- name: deploy
|
- name: 'Trigger Portainer stack redeploy'
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
environment:
|
environment:
|
||||||
PORTAINER_WEBHOOK_URL:
|
PORTAINER_WEBHOOK_URL:
|
||||||
@@ -82,4 +74,4 @@ steps:
|
|||||||
fi
|
fi
|
||||||
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
echo "✓ Portainer redeploy triggered (HTTP $code)"
|
||||||
depends_on:
|
depends_on:
|
||||||
- push
|
- 'Push to registry'
|
||||||
|
|||||||
@@ -17,15 +17,3 @@ steps:
|
|||||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||||
- pnpm run lint
|
- pnpm run lint
|
||||||
- pnpm run lint:css
|
- pnpm run lint:css
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: node:20-alpine
|
|
||||||
commands:
|
|
||||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
|
||||||
- pnpm run build
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
image: node:20-alpine
|
|
||||||
commands:
|
|
||||||
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
|
||||||
- pnpm test
|
|
||||||
15
.woodpecker/test.yaml
Normal file
15
.woodpecker/test.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# PR pipeline: lint, build, test on the branch (separate steps, shared workspace).
|
||||||
|
# Runs when a pull request is opened or updated.
|
||||||
|
# Does not build Docker image or deploy.
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: node:20-alpine
|
||||||
|
commands:
|
||||||
|
- corepack enable && corepack prepare pnpm@10.28.2 --activate
|
||||||
|
- pnpm test
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- build
|
||||||
Reference in New Issue
Block a user