Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit 3fe87c9

Browse files
chore: promote main to stable
2 parents 37443a1 + 410924b commit 3fe87c9

25 files changed

Lines changed: 2634 additions & 459 deletions

.github/workflows/deploy-demo.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
cache: "pnpm"
4343

4444
- name: Install and Build
45+
env:
46+
VITE_API_BASE_URL: https://esign-demo-proxy-server-191591660773.us-central1.run.app
4547
run: |
4648
pnpm install
4749
rm -rf dist
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Deploy Proxy Server
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
8+
REGION: ${{ vars.GCP_REGION }}
9+
SERVICE_NAME: ${{ vars.GCP_SERVICE_NAME }}
10+
SUPERDOC_SERVICES_API_KEY: ${{ secrets.SUPERDOC_SERVICES_API_KEY }}
11+
SUPERDOC_SERVICES_BASE_URL: ${{ vars.SUPERDOC_SERVICES_BASE_URL }}
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
id-token: write
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
24+
- name: Auth to Google Cloud
25+
uses: google-github-actions/auth@v2
26+
with:
27+
credentials_json: ${{ secrets.GCP_SA_KEY }}
28+
29+
- name: Setup gcloud
30+
uses: google-github-actions/setup-gcloud@v2
31+
with:
32+
project_id: ${{ env.PROJECT_ID }}
33+
34+
- name: Build and push container with Cloud Build
35+
run: |
36+
REGION="${REGION:-us-central1}"
37+
SERVICE_NAME="${SERVICE_NAME:-esign-demo-proxy-server}"
38+
IMAGE="gcr.io/${PROJECT_ID}/${SERVICE_NAME}:${GITHUB_SHA}"
39+
40+
echo "REGION=${REGION}" >> $GITHUB_ENV
41+
echo "SERVICE_NAME=${SERVICE_NAME}" >> $GITHUB_ENV
42+
echo "IMAGE=${IMAGE}" >> $GITHUB_ENV
43+
44+
gcloud builds submit demo/server --tag "${IMAGE}"
45+
env:
46+
PROJECT_ID: ${{ env.PROJECT_ID }}
47+
REGION: ${{ env.REGION }}
48+
SERVICE_NAME: ${{ env.SERVICE_NAME }}
49+
50+
- name: Deploy container to Cloud Run
51+
run: |
52+
REGION="${REGION:-us-central1}"
53+
SERVICE_NAME="${SERVICE_NAME:-esign-demo-proxy-server}"
54+
IMAGE="${IMAGE}"
55+
SUPERDOC_SERVICES_BASE_URL="${SUPERDOC_SERVICES_BASE_URL:-https://api.superdoc.dev}"
56+
57+
gcloud run deploy "${SERVICE_NAME}" \
58+
--image "${IMAGE}" \
59+
--region "${REGION}" \
60+
--memory=1Gi \
61+
--cpu=1 \
62+
--allow-unauthenticated \
63+
--set-env-vars SUPERDOC_SERVICES_BASE_URL="${SUPERDOC_SERVICES_BASE_URL}" \
64+
--set-secrets="SUPERDOC_SERVICES_API_KEY=esign-demo-sd-services-api-key:latest"
65+
env:
66+
IMAGE: ${{ env.IMAGE }}
67+
REGION: ${{ env.REGION }}
68+
SERVICE_NAME: ${{ env.SERVICE_NAME }}
69+
SUPERDOC_SERVICES_API_KEY: ${{ env.SUPERDOC_SERVICES_API_KEY }}
70+
SUPERDOC_SERVICES_BASE_URL: ${{ env.SUPERDOC_SERVICES_BASE_URL }}

.github/workflows/release-package.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,24 @@ jobs:
5151
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5252
run: |
5353
pnpm dlx semantic-release
54+
55+
- name: Create sync PR to main
56+
if: github.ref == 'refs/heads/stable'
57+
env:
58+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
59+
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
60+
run: |
61+
pr_number=$(gh pr list --base main --head stable --state open --json number --jq '.[0].number')
62+
if [ -z "$pr_number" ]; then
63+
git fetch origin main
64+
if git diff --quiet origin/main...HEAD; then
65+
echo "Main is already up to date with stable; skipping PR."
66+
exit 0
67+
fi
68+
pr_url=$(gh pr create --base main --head stable --title "chore: sync stable release to main" --body "Automated PR to merge the latest stable changes back into main.")
69+
pr_number=$(echo "$pr_url" | grep -oE '[0-9]+$')
70+
echo "Created PR #$pr_number to sync stable into main."
71+
else
72+
echo "PR #$pr_number already open to sync stable into main."
73+
fi
74+
gh pr merge "$pr_number" --merge --auto || echo "Auto-merge setup skipped (conditions not met)."

0 commit comments

Comments
 (0)