Skip to content

Commit 8f4d2a2

Browse files
committed
ci: replace IS_GITEA var with server_url detection
Updates the docs deployment and notebook test workflows to automatically detect the running environment using `github.server_url`. This removes the dependency on the manual `IS_GITEA` variable, ensuring that Gitea deployment jobs run correctly on self-hosted instances and are skipped on GitHub.com.
1 parent 6b74b8f commit 8f4d2a2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
# Deploy job for GitHub Pages
8787
deploy-github:
8888
needs: build
89-
if: ${{ vars.IS_GITEA != 'true' }}
89+
if: ${{ github.server_url == 'https://github.com' }}
9090
environment:
9191
name: github-pages
9292
url: ${{ steps.deployment.outputs.page_url }}
@@ -114,7 +114,7 @@ jobs:
114114
# Deploy job for Gitea
115115
deploy-gitea:
116116
needs: build
117-
if: ${{ vars.IS_GITEA == 'true' }}
117+
if: ${{ github.server_url != 'https://github.com' }}
118118
runs-on: ubuntu-latest
119119
env:
120120
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt

.github/workflows/notebook-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
echo "TORCH_CPU_ONLY=true" >> $GITHUB_ENV
2929
fi
3030
31-
if [[ "${{ vars.IS_GITEA }}" == "true" ]]; then
31+
if [[ "${{ github.server_url }}" != "https://github.com" ]] && [[ -z "${{ env.ACT }}" ]]; then
3232
echo "Setting thread limits for Gitea runner"
3333
echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV
3434
echo "MKL_NUM_THREADS=1" >> $GITHUB_ENV

0 commit comments

Comments
 (0)