This repository was archived by the owner on Jan 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1515 build-docs :
1616 runs-on : ubuntu-latest
1717 container : ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev
18- if : github.repository == 'sagemath/sagetrac-mirror'
18+ env :
19+ CAN_DEPLOY : ${{ secrets.NETLIFY_AUTH_TOKEN != '' }}
1920 steps :
2021 - name : Checkout
2122 uses : actions/checkout@v3
3334 SAGE_NUM_THREADS : 2
3435
3536 - name : Copy docs
37+ if : env.CAN_DEPLOY == 'true'
3638 run : |
3739 # For some reason the deploy step below cannot find /sage/...
3840 # So copy everything from there to local folder
4244
4345 - name : Deploy to Netlify preview
4446 id : preview-netlify
45- if : github.ref != 'refs/heads/develop'
47+ if : env.CAN_DEPLOY == 'true' && github.ref != 'refs/heads/develop'
4648 uses : netlify/actions/cli@master
4749 with :
4850 args : deploy --dir=docs --alias="${NETLIFY_ALIAS}"
6062
6163 - name : Deploy to Netlify production
6264 id : deploy-netlify
63- if : github.ref == 'refs/heads/develop'
65+ if : env.CAN_DEPLOY == 'true' && github.ref == 'refs/heads/develop'
6466 uses : netlify/actions/cli@master
6567 with :
6668 args : deploy --dir=docs --prod
6971 NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
7072
7173 - name : Report deployment url
74+ if : env.CAN_DEPLOY == 'true'
7275 run : |
7376 echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.preview-netlify.outputs.NETLIFY_URL || steps.deploy-netlify.outputs.NETLIFY_URL }}"
You can’t perform that action at this time.
0 commit comments