|
17 | 17 |
|
18 | 18 | env: |
19 | 19 | DEPLOY_ENV: ${{ github.event_name == 'push' && 'production' || format('pr-{0}', github.event.number) }} |
| 20 | + SHARED_INFRA_VPC_ID: ${{ vars.SHARED_INFRA_VPC_ID }} |
| 21 | + SHARED_INFRA_CLUSTER_ARN: ${{ vars.SHARED_INFRA_CLUSTER_ARN }} |
20 | 22 | CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
21 | 23 | CLOUDFLARE_DEFAULT_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_DEFAULT_ACCOUNT_ID }} |
22 | 24 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} |
@@ -53,74 +55,86 @@ jobs: |
53 | 55 | working-directory: ./examples/yjs |
54 | 56 | run: | |
55 | 57 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 58 | + code=$! |
56 | 59 | if [ -f ".sst/outputs.json" ]; then |
57 | 60 | yjs=$(jq -r '.website' .sst/outputs.json) |
58 | 61 | echo "yjs=$yjs" >> $GITHUB_ENV |
59 | 62 | else |
60 | 63 | echo "sst outputs file not found. Exiting." |
61 | 64 | exit 123 |
62 | 65 | fi |
| 66 | + exit $code |
63 | 67 |
|
64 | 68 | - name: Deploy Linearlite Read Only |
65 | 69 | working-directory: ./examples/linearlite-read-only |
66 | 70 | run: | |
67 | 71 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 72 | + code=$! |
68 | 73 | if [ -f ".sst/outputs.json" ]; then |
69 | 74 | linearlite_read_only=$(jq -r '.website' .sst/outputs.json) |
70 | 75 | echo "linearlite_read_only=$linearlite_read_only" >> $GITHUB_ENV |
71 | 76 | else |
72 | 77 | echo "sst outputs file not found. Exiting." |
73 | 78 | exit 123 |
74 | 79 | fi |
| 80 | + exit $code |
75 | 81 |
|
76 | 82 | - name: Deploy Write Patterns example |
77 | 83 | working-directory: ./examples/write-patterns |
78 | 84 | run: | |
79 | 85 | pnpm --filter @electric-sql/client --filter @electric-sql/experimental --filter @electric-sql/react run build |
80 | 86 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 87 | + code=$! |
81 | 88 | if [ -f ".sst/outputs.json" ]; then |
82 | 89 | writes=$(jq -r '.website' .sst/outputs.json) |
83 | 90 | echo "writes=$writes" >> $GITHUB_ENV |
84 | 91 | else |
85 | 92 | echo "sst outputs file not found. Exiting." |
86 | 93 | exit 123 |
87 | 94 | fi |
| 95 | + exit $code |
88 | 96 |
|
89 | 97 | - name: Deploy NextJs example |
90 | 98 | working-directory: ./examples/nextjs |
91 | 99 | run: | |
92 | 100 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 101 | + code=$! |
93 | 102 | if [ -f ".sst/outputs.json" ]; then |
94 | 103 | nextjs=$(jq -r '.website' .sst/outputs.json) |
95 | 104 | echo "nextjs=$nextjs" >> $GITHUB_ENV |
96 | 105 | else |
97 | 106 | echo "sst outputs file not found. Exiting." |
98 | 107 | exit 123 |
99 | 108 | fi |
| 109 | + exit $code |
100 | 110 |
|
101 | 111 | - name: Deploy TODO App example |
102 | 112 | working-directory: ./examples/todo-app |
103 | 113 | run: | |
104 | 114 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 115 | + code=$! |
105 | 116 | if [ -f ".sst/outputs.json" ]; then |
106 | 117 | todoapp=$(jq -r '.website' .sst/outputs.json) |
107 | 118 | echo "todoapp=$todoapp" >> $GITHUB_ENV |
108 | 119 | else |
109 | 120 | echo "sst outputs file not found. Exiting." |
110 | 121 | exit 123 |
111 | 122 | fi |
| 123 | + exit $code |
112 | 124 |
|
113 | 125 | - name: Deploy proxy-auth example |
114 | 126 | working-directory: ./examples/proxy-auth |
115 | 127 | run: | |
116 | 128 | pnpm sst deploy --stage ${{ env.DEPLOY_ENV }} |
| 129 | + code=$! |
117 | 130 | if [ -f ".sst/outputs.json" ]; then |
118 | 131 | auth=$(jq -r '.website' .sst/outputs.json) |
119 | 132 | echo "auth=$auth" >> $GITHUB_ENV |
120 | 133 | else |
121 | 134 | echo "sst outputs file not found. Exiting." |
122 | 135 | exit 123 |
123 | 136 | fi |
| 137 | + exit $code |
124 | 138 |
|
125 | 139 | - name: Add comment to PR |
126 | 140 | if: github.event_name == 'pull_request' |
|
0 commit comments