Skip to content

Commit

Permalink
Fix broken docs build (#23562)
Browse files Browse the repository at this point in the history
## Summary & Motivation

## How I Tested These Changes
  • Loading branch information
PedramNavid committed Aug 9, 2024
1 parent dc283a2 commit 637707c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
REF_NAME: ${{ github.ref_name }}
if: |
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-')))
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/heads/docs-prod')))
run: |
BRANCH_PREVIEW_SUBDOMAIN=$(echo "${HEAD_REF:-$REF_NAME}" | sed -e 's/[^a-zA-Z0-9-]/-/g; s/^-*//; s/-*$//')
echo "$BRANCH_PREVIEW_SUBDOMAIN"
echo "BRANCH_PREVIEW_SUBDOMAIN=$BRANCH_PREVIEW_SUBDOMAIN" >> "${GITHUB_ENV}"
- name: Checkout master/release branch
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-'))
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/heads/docs-prod'))
uses: actions/checkout@v4

- name: Get PR fetch depth
Expand Down Expand Up @@ -71,14 +71,15 @@ jobs:

- name: Copy doc snippets to public directory
run: |
ls
mkdir -p docs/next/public/docs_snippets
cp -R examples/docs_snippets/docs_snippets docs/next/public/docs_snippets/
- name: Publish Preview to Vercel
uses: amondnet/vercel-action@v25
if: |
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-')))
(github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/heads/docs-prod')))
with:
github-comment: ${{ github.event.pull_request && env.CHANGES_ENTRY || true }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
Expand Down Expand Up @@ -108,4 +109,4 @@ jobs:
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: "--prod"
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ${{ secrets.VERCEL_ORG_ID }}
scope: ${{ secrets.VERCEL_ORG_ID }}

0 comments on commit 637707c

Please sign in to comment.