Skip to content

Commit 5c3f467

Browse files
committed
Added staging environment profile and Actions workflow for deployment to it
1 parent e2506e8 commit 5c3f467

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to Staging
2+
3+
on:
4+
push:
5+
branches:
6+
- git-pr-workflow
7+
paths:
8+
- '.wiremock/**'
9+
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
23+
- name: Install WireMock CLI
24+
run: npm install -g @wiremock-inc/wiremock-cli
25+
26+
- name: Configure WireMock CLI
27+
env:
28+
WIREMOCK_API_TOKEN: ${{ secrets.WIREMOCK_API_TOKEN }}
29+
run: |
30+
wiremock config set api-token $WIREMOCK_API_TOKEN
31+
32+
- name: Push to staging environment
33+
run: |
34+
wiremock push mock-api --all --profile staging
35+
36+
- name: Verify deployment
37+
run: |
38+
echo "✅ Successfully deployed mock APIs to staging environment"

.wiremock/wiremock-staging.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
services:
2+
paypal-invoicing-record-target:
3+
cloud_id: '4de1y'
4+
github-rest-record-target:
5+
cloud_id: '1m319'

0 commit comments

Comments
 (0)