55 branches : [ main ]
66 tags :
77 - ' v[0-9]*.[0-9]*.[0-9]*'
8- pull_request :
9- types : [opened, synchronize, reopened]
108
119jobs :
12- Build_and_deploy_doc :
10+ build-deploy-doc :
11+ name : Build & deploy doc
12+ environment : prod-documentation
1313 runs-on : ubuntu-latest
1414 permissions :
1515 contents : write
@@ -33,21 +33,18 @@ jobs:
3333 id : deploy_folder
3434 run : |
3535 echo "Determining deployment folder..."
36- if [ "${{ github.event_name }}" = "pull_request" ]; then
37- echo "Deploying to target pr/${{ github.event.number }}"
38- echo "DEPLOY_DIR=pr/${{ github.event.number }}" >> $GITHUB_OUTPUT
39- elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
36+ if [[ "${{ github.ref }}" == refs/tags/* ]]; then
4037 echo "Deploying to target ${{ github.ref_name }}"
4138 echo "DEPLOY_DIR=${{ github.ref_name }}" >> $GITHUB_OUTPUT
4239 else
43- echo "Deploying to target main "
44- echo "DEPLOY_DIR=main " >> $GITHUB_OUTPUT
40+ echo "Deploying to target latest "
41+ echo "DEPLOY_DIR=latest " >> $GITHUB_OUTPUT
4542 fi
4643
4744 - name : Deploy to DEPLOY_DIR of TorchJD/documentation
4845 uses : peaceiris/actions-gh-pages@v4
4946 with :
50- deploy_key : ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
47+ deploy_key : ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
5148 publish_dir : docs/build/dirhtml
5249 destination_dir : ${{ steps.deploy_folder.outputs.DEPLOY_DIR }}
5350 external_repository : TorchJD/documentation
5754 if : startsWith(github.ref, 'refs/tags/')
5855 uses : peaceiris/actions-gh-pages@v4
5956 with :
60- deploy_key : ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
57+ deploy_key : ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
6158 publish_dir : docs/build/dirhtml
6259 destination_dir : stable
6360 external_repository : TorchJD/documentation
0 commit comments