[GitHub Actions] Always use gh-pages on fork
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 7be3317..e9306d7 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -38,13 +38,22 @@
echo "BASE_URL=" >> ../env.sh
echo "ORIGIN=$(jq .repository.full_name ${GITHUB_EVENT_PATH})" >> ../env.sh
echo "TARGET_BRANCH=asf-site" >> ../env.sh
- if: github.event_name == 'push'
- - name: Configure for GitHub Pages
+ if: |
+ github.event_name == 'push' && github.repository == 'apache/arrow-site'
+ - name: Configure for GitHub Pages on master
+ run: |
+ echo "BASE_URL=$(jq .repository.name ${GITHUB_EVENT_PATH})" >> ../env.sh
+ echo "ORIGIN=$(jq .repository.full_name ${GITHUB_EVENT_PATH})" >> ../env.sh
+ echo "TARGET_BRANCH=gh-pages" >> ../env.sh
+ if: |
+ github.event_name == 'push' && github.repository != 'apache/arrow-site'
+ - name: Configure for GitHub Pages on pull request
run: |
echo "BASE_URL=$(jq .pull_request.head.repo.name ${GITHUB_EVENT_PATH})" >> ../env.sh
echo "ORIGIN=$(jq .pull_request.head.repo.full_name ${GITHUB_EVENT_PATH})" >> ../env.sh
echo "TARGET_BRANCH=gh-pages" >> ../env.sh
- if: github.event_name == 'pull_request'
+ if: |
+ github.event_name == 'pull_request'
- name: Build
run: |
. ../env.sh