summaryrefslogtreecommitdiff
path: root/.github/workflows/docs.yml
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2023-10-23 21:34:06 -0700
committerGitHub <noreply@github.com>2023-10-23 21:34:06 -0700
commit397f1ce9efb4eea1ee10fe4833f733b8c7abd878 (patch)
treebce54faea247c3da5d4dbdd6f352bee14db3f6a7 /.github/workflows/docs.yml
parented2d0b0e9b6c56ed5bb5669d07a6036d087464b8 (diff)
[Github] Use API to fetch PR diff for docs action (#70001)
People are currently running into issues where the files-changed step isn't able to find the merge base. This seems to happen more often on very out of date branches. This patch side steps the issue by just fetching the diff from the GH API.
Diffstat (limited to '.github/workflows/docs.yml')
-rw-r--r--.github/workflows/docs.yml20
1 files changed, 4 insertions, 16 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 6ee66c938cdf..0f2da75a6844 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -33,22 +33,6 @@ jobs:
name: "Test documentation build"
runs-on: ubuntu-latest
steps:
- # Fetch all the commits in a pull request + 1 so that the
- # docs-changed-subprojects step won't pull them in itself in an extremely
- # slow manner.
- - name: Calculate number of commits to fetch (PR)
- if: ${{ github.event_name == 'pull_request' }}
- run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- - name: Fetch LLVM sources (PR)
- if: ${{ github.event_name == 'pull_request' }}
- uses: actions/checkout@v4
- with:
- fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- - name: Fetch LLVM sources (push)
- if: ${{ github.event_name == 'push' }}
- uses: actions/checkout@v4
- with:
- fetch-depth: 1
- name: Get subprojects that have doc changes
id: docs-changed-subprojects
uses: tj-actions/changed-files@v39
@@ -66,6 +50,10 @@ jobs:
- 'libunwind/docs/**'
libcxx:
- 'libcxx/docs/**'
+ - name: Fetch LLVM sources
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 1
- name: Setup Python env
uses: actions/setup-python@v4
with: