Skip to content

Commit e93cb73

Browse files
committed
ci: add encore auth token for cloud secrets
1 parent 3acc8d3 commit e93cb73

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
#
66
# This workflow uses the unified `task qa:all` command.
77
# Mirrors Husky pre-push hook exactly (same commands, same checks).
8-
#
9-
# Before enabling in other branches:
10-
# 1. Verify `task qa:all` passes locally
11-
# 2. Ensure backend/frontend ports match `.env`
12-
# 3. Confirm Encore CLI auth is configured in repo secrets
138

149
name: CI
1510

@@ -54,13 +49,27 @@ jobs:
5449
curl -L https://encore.dev/install.sh | bash
5550
echo "$HOME/.encore/bin" >> $GITHUB_PATH
5651
52+
- name: Authenticate with Encore Cloud
53+
env:
54+
ENCORE_AUTH_TOKEN: ${{ secrets.ENCORE_AUTH_TOKEN }}
55+
run: |
56+
if [ -z "$ENCORE_AUTH_TOKEN" ]; then
57+
echo "⚠️ WARNING: ENCORE_AUTH_TOKEN not set in GitHub Secrets"
58+
echo " Encore builds requiring secrets will fail"
59+
echo " To fix: Add your Encore auth token as a GitHub Secret named 'ENCORE_AUTH_TOKEN'"
60+
else
61+
echo "🔐 Encore authentication configured"
62+
fi
63+
5764
- name: Install Backend Dependencies
5865
run: cd backend && bun install
5966

6067
- name: Install Frontend Dependencies
6168
run: cd frontend && bun install
6269

6370
- name: Start Backend
71+
env:
72+
ENCORE_AUTH_TOKEN: ${{ secrets.ENCORE_AUTH_TOKEN }}
6473
run: |
6574
cd backend
6675
encore run &
@@ -103,7 +112,13 @@ jobs:
103112
# Environment:
104113
# - Uses standard ports from .env (4000 backend, 5173 frontend)
105114
# - In-memory database for tests
106-
# - No secrets required
115+
# - ENCORE_AUTH_TOKEN: GitHub Secret required for accessing Encore Cloud secrets
116+
#
117+
# GitHub Secrets Setup:
118+
# 1. Go to: Settings → Secrets and variables → Actions
119+
# 2. Create new secret: ENCORE_AUTH_TOKEN
120+
# 3. Get token from: encore auth token (run locally)
121+
# 4. Paste into GitHub Secrets
107122
#
108123
# Testing before activation:
109124
# 1. Create feature branch

0 commit comments

Comments
 (0)