File tree Expand file tree Collapse file tree 9 files changed +8
-46
lines changed Expand file tree Collapse file tree 9 files changed +8
-46
lines changed Original file line number Diff line number Diff line change 1
1
name : Build & Test
2
2
3
3
on :
4
+ pull_request :
4
5
push :
5
6
workflow_dispatch :
6
7
# Allow to run manually
Original file line number Diff line number Diff line change 1
1
name : Build & Test using Conda
2
2
3
3
on :
4
- pull_request :
5
- types : [opened, synchronize]
6
4
push :
7
5
tags :
8
6
- ' *'
Original file line number Diff line number Diff line change 1
1
name : CI cygwin-minimal
2
2
3
3
on :
4
- pull_request :
5
- types : [opened, synchronize]
6
4
push :
7
5
tags :
8
6
- ' *'
Original file line number Diff line number Diff line change 1
1
name : CI cygwin-standard
2
2
3
3
on :
4
- pull_request :
5
- types : [opened, synchronize]
6
4
push :
7
5
tags :
8
6
- ' *'
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ name: CI Linux
18
18
# on: [push, pull_request]
19
19
20
20
on :
21
- pull_request :
22
- types : [opened, synchronize]
23
21
push :
24
22
tags :
25
23
- ' *'
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ name: CI macOS
18
18
# on: [push, pull_request]
19
19
20
20
on :
21
- pull_request :
22
- types : [opened, synchronize]
23
21
push :
24
22
tags :
25
23
- ' *'
Original file line number Diff line number Diff line change 1
1
name : Build & Test WSL
2
2
3
3
on :
4
- pull_request :
5
- types : [opened, synchronize]
6
4
push :
7
5
tags :
8
6
- ' *'
Original file line number Diff line number Diff line change 1
1
name : Build documentation
2
2
3
3
on :
4
+ pull_request :
4
5
push :
5
6
workflow_dispatch :
6
7
# Allow to run manually
14
15
build-docs :
15
16
runs-on : ubuntu-latest
16
17
container : ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev
17
- if : github.repository == 'sagemath/sagetrac-mirror'
18
+ env :
19
+ CAN_DEPLOY : ${{ secrets.NETLIFY_AUTH_TOKEN != '' }}
18
20
steps :
19
21
- name : Checkout
20
22
uses : actions/checkout@v3
32
34
SAGE_NUM_THREADS : 2
33
35
34
36
- name : Copy docs
37
+ if : env.CAN_DEPLOY == 'true'
35
38
run : |
36
39
# For some reason the deploy step below cannot find /sage/...
37
40
# So copy everything from there to local folder
41
44
42
45
- name : Deploy to Netlify preview
43
46
id : preview-netlify
44
- if : github.ref != 'refs/heads/develop'
47
+ if : env.CAN_DEPLOY == 'true' && github.ref != 'refs/heads/develop'
45
48
uses : netlify/actions/cli@master
46
49
with :
47
50
args : deploy --dir=docs --alias="${NETLIFY_ALIAS}"
59
62
60
63
- name : Deploy to Netlify production
61
64
id : deploy-netlify
62
- if : github.ref == 'refs/heads/develop'
65
+ if : env.CAN_DEPLOY == 'true' && github.ref == 'refs/heads/develop'
63
66
uses : netlify/actions/cli@master
64
67
with :
65
68
args : deploy --dir=docs --prod
68
71
NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
69
72
70
73
- name : Report deployment url
74
+ if : env.CAN_DEPLOY == 'true'
71
75
run : |
72
76
echo "::notice::The documentation has being automatically deployed to Netlify. %0A ✅ Preview: ${{ steps.preview-netlify.outputs.NETLIFY_URL || steps.deploy-netlify.outputs.NETLIFY_URL }}"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments