Add missing checkout for pages build

This commit is contained in:
Jordan Dominion
2024-08-16 23:36:11 -04:00
parent 5c42a15455
commit 05410145af
+34
View File
@@ -458,6 +458,40 @@ jobs:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}
- name: Checkout (Branch)
uses: actions/checkout@v4
if: github.event_name == 'push' || github.event_name == 'schedule'
- name: Checkout (PR Merge)
uses: actions/checkout@v4
if: github.event_name != 'push' && github.event_name != 'schedule'
with:
ref: "refs/pull/${{ inputs.pull_request_number}}/merge"
- name: Read Current SHA
id: get-pr-sha
if: github.event_name != 'push' && github.event_name != 'schedule'
shell: bash
run: echo "head_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Abort if PR Merge SHA has Changed
uses: actions/github-script@v7
if: github.event_name != 'push' && github.event_name != 'schedule' && steps.get-pr-sha.outputs.head_sha != github.sha
with:
script: |
const delay = ms => new Promise(res => setTimeout(res, ms));
github.rest.actions.cancelWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId
});
while (true) {
core.info('Waiting for workflow to cancel ...');
await delay(5000);
}
- name: gh-pages Clone
run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox