Skip to content

Commit

Permalink
[CI] Fix deployed documentation folder names (#1192)
Browse files Browse the repository at this point in the history
* print ref name and head ref

* test
  • Loading branch information
NicolasGensollen authored May 27, 2024
1 parent 5de94fb commit 7f57120
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
env:
POETRY_VERSION: '1.6.1'
PYTHON_VERSION: '3.10'
PR_NUMBER: "PR-${{ github.event.number }}"
BRANCH_NAME: "PR-${{ github.event.number }}"

jobs:
build-and-deploy-doc:
Expand All @@ -40,11 +40,13 @@ jobs:
run: |
echo "${GITHUB_REF}"
echo "${PR_NUMBER}"
if [[ ! -z "${TAG_NAME}" ]];
echo "${{ github.ref_name }}"
echo "${{ github.head_ref }}"
if [[ ! -z "${{ github.event_number }}" ]];
then
BRANCH_NAME="${TAG_NAME}"
BRANCH_NAME="${{ github.head_ref }}"
fi
mv site "${PR_NUMBER}"
ls "${PR_NUMBER}"
scp -r "${PR_NUMBER}" "aramislab:/srv/local/clinica/docs/public/${PR_NUMBER}"
mv site "${BRANCH_NAME}"
ls "${BRANCH_NAME}"
scp -r "${BRANCH_NAME}" "aramislab:/srv/local/clinica/docs/public/${BRANCH_NAME}"

0 comments on commit 7f57120

Please sign in to comment.