2020 - name : Checkout code
2121 uses : actions/checkout@v4
2222
23- - name : Determine environment and URL
24- id : set-env
25- run : |
26- if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
27- echo "SITE_URL=${{ secrets.PROD_URL }}" >> $GITHUB_ENV
28- elif [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
29- echo "SITE_URL=${{ secrets.DEV_URL }}" >> $GITHUB_ENV
30- elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "main" ]]; then
31- echo "SITE_URL=${{ secrets.PROD_URL }}" >> $GITHUB_ENV
32- elif [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "dev" ]]; then
33- echo "SITE_URL=${{ secrets.DEV_URL }}" >> $GITHUB_ENV
34- fi
35-
3623 - name : Setup Node.js
3724 uses : actions/setup-node@v4
3825 with :
6552
6653 - name : Build site
6754 run : npm run build
68- env :
69- RENDER_EXTERNAL_URL : ${{ env.SITE_URL }}
7055
7156 - name : Validate build output
7257 run : |
10489 id : deploy
10590 uses :
JorgeLNJunior/[email protected] 10691 with :
107- service_id : ${{ secrets.RENDER_DEV_SERVICE_ID }} # Use separate dev service ID
92+ service_id : ${{ secrets.RENDER_SERVICE_ID }}
10893 api_key : ${{ secrets.RENDER_API_KEY }}
10994 wait_deploy : true
11095 github_deployment : true
@@ -117,7 +102,7 @@ jobs:
117102 with :
118103 github-token : ${{ secrets.GITHUB_TOKEN }}
119104 script : |
120- const deployUrl = '${{ secrets.DEV_URL }}';
105+ const deployUrl = '${{ secrets.SITE_URL }}';
121106 const environment = 'Development';
122107 const commentIdentifier = `<!-- deployment-bot:${environment} -->`;
123108
@@ -185,7 +170,7 @@ jobs:
185170 id : deploy
186171 uses :
JorgeLNJunior/[email protected] 187172 with :
188- service_id : ${{ secrets.RENDER_PROD_SERVICE_ID }} # Use separate prod service ID
173+ service_id : ${{ secrets.RENDER_SERVICE_ID }}
189174 api_key : ${{ secrets.RENDER_API_KEY }}
190175 wait_deploy : true
191176 github_deployment : true
@@ -198,7 +183,7 @@ jobs:
198183 with :
199184 github-token : ${{ secrets.GITHUB_TOKEN }}
200185 script : |
201- const deployUrl = '${{ secrets.PROD_URL }}';
186+ const deployUrl = '${{ secrets.SITE_URL }}';
202187 const environment = 'Production';
203188 const commentIdentifier = `<!-- deployment-bot:${environment} -->`;
204189
0 commit comments