diff --git a/.github/workflows/_docs.yml b/.github/workflows/_docs.yml index 6f29235e..49fff6c2 100644 --- a/.github/workflows/_docs.yml +++ b/.github/workflows/_docs.yml @@ -26,8 +26,11 @@ jobs: - name: Remove environment.pickle run: rm build/html/.doctrees/environment.pickle + - name: Sanitize ref name for docs version + run: echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" >> $GITHUB_ENV + - name: Move to versioned directory - run: mv build/html build/${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_} + run: mv build/html build/$DOCS_VERSION - name: Upload built docs artifact uses: actions/upload-artifact@v4