3333 workflow_run :
3434 workflows : ["Build and deploy GovTool test stack"]
3535 types : [completed]
36- branches :
36+ branches :
3737 - test
3838 - infra/test-chores
3939
5959
6060 - name : Set pending commit status
6161 id : set-pending-status
62+ if : ${{ !github.event.schedule }}
6263 run : |
6364 echo "timestamp=$(date +%s)" >> $GITHUB_OUTPUT
6465 curl -X POST -H "Authorization: Bearer ${{ github.token }}" \
@@ -121,27 +122,18 @@ jobs:
121122 repository : ${{vars.GH_PAGES}}
122123 ssh-key : ${{ secrets.DEPLOY_KEY }}
123124
125+ - name : Set Deployment Environment
126+ id : set-deployment-url
127+ run : |
128+ chmod +x .github/scripts/set_deployment_environment.sh
129+ .github/scripts/set_deployment_environment.sh
130+
124131 - name : Remove oldest report to save space
125132 if : ${{success()}}
126133 run : |
127134 chmod +x .github/scripts/remove_oldest_report.sh
128135 .github/scripts/remove_oldest_report.sh
129136
130- - name : Register report
131- id : register-project
132- if : ${{success()}}
133- run : |
134- chmod +x .github/scripts/register_report.sh
135- .github/scripts/register_report.sh
136-
137- - if : steps.register-project.outputs.project_exists != 'true'
138- uses : JamesIves/github-pages-deploy-action@v4
139- with :
140- ssh-key : ${{ secrets.DEPLOY_KEY }}
141- repository-name : ${{vars.GH_PAGES}}
142- branch : gh-pages
143- folder : project
144-
145137 - name : Generate report details
146138 id : report-details
147139 run : |
@@ -153,7 +145,7 @@ jobs:
153145 id : allure-report
154146 with :
155147 allure_results : allure-results
156- gh_pages : gh-pages/${{env.REPORT_NAME}}
148+ gh_pages : gh-pages/${{steps.set-deployment-url.outputs.group_name}}/${{ env.REPORT_NAME}}
157149 allure_report : allure-report
158150 allure_history : allure-history
159151 keep_reports : 2000
@@ -172,7 +164,7 @@ jobs:
172164 repository-name : ${{vars.GH_PAGES}}
173165 branch : gh-pages
174166 folder : build
175- target-folder : ${{ env.REPORT_NAME }}
167+ target-folder : ${{steps.set-deployment-url.outputs.group_name}}/${{ env.REPORT_NAME }}
176168
177169 publish-status :
178170 runs-on : ubuntu-latest
@@ -185,8 +177,9 @@ jobs:
185177 with :
186178 name : allure-results
187179 path : allure-results
180+
188181 - name : Set Commit Status
189- if : always()
182+ if : always() && !github.event.schedule
190183 run : |
191184 chmod +x .github/scripts/set_commit_status.sh
192185 .github/scripts/set_commit_status.sh
@@ -198,6 +191,7 @@ jobs:
198191
199192env :
200193 BASE_URL : https://${{github.event.schedule && 'be.preview.gov.tools' || inputs.deployment || 'govtool.cardanoapi.io/api' }}
194+ DEPLOYMENT : ${{ inputs.deployment || 'govtool.cardanoapi.io/api'}}
201195 REPORT_NAME : ${{ github.event.schedule && 'nightly-'}}govtool-backend
202196 GH_PAGES : ${{vars.GH_PAGES}}
203197 COMMIT_SHA : ${{ github.event.workflow_run.head_sha || github.sha }}
0 commit comments