mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 08:00:19 +01:00
Add missing checkout for pages build
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user