@@ -75,13 +75,50 @@ jobs:
75
75
- name : Run Tests
76
76
run : ./gradlew retrofit:robovm-test:robovmTest
77
77
78
- publish :
78
+ website :
79
79
runs-on : ubuntu-latest
80
- if : github.repository == 'square/retrofit' && github.ref == 'refs/heads/trunk'
80
+ steps :
81
+ - uses : actions/checkout@v4
82
+ - uses : actions/setup-java@v4
83
+ with :
84
+ distribution : ' zulu'
85
+ java-version-file : .github/workflows/.java-version
86
+ - uses : gradle/actions/setup-gradle@v4
87
+
88
+ - name : Build snapshot website
89
+ run : |
90
+ ./gradlew copyWebsiteDocs
91
+ cd website
92
+ npm install && npm run build
93
+
94
+ - uses : actions/upload-artifact@v4
95
+ with :
96
+ name : website
97
+ path : website/dist
98
+ if-no-files-found : error
99
+
100
+ final-status :
101
+ runs-on : ubuntu-latest
102
+ if : ${{ !cancelled() }}
81
103
needs :
82
104
- jvm
83
105
- android
84
106
- robovm
107
+ - website
108
+ steps :
109
+ - name : Check
110
+ run : |
111
+ results=$(tr -d '\n' <<< '${{ toJSON(needs.*.result) }}')
112
+ if ! grep -q -v -E '(failure|cancelled)' <<< "$results"; then
113
+ echo "One or more required jobs failed"
114
+ exit 1
115
+ fi
116
+
117
+ publish :
118
+ runs-on : ubuntu-latest
119
+ if : github.repository == 'square/retrofit' && github.ref == 'refs/heads/trunk'
120
+ needs :
121
+ - final-status
85
122
86
123
steps :
87
124
- uses : actions/checkout@v4
@@ -98,11 +135,10 @@ jobs:
98
135
ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.GPG_SECRET_KEY }}
99
136
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.GPG_SECRET_PASSPHRASE }}
100
137
101
- - name : Build snapshot website
102
- run : |
103
- ./gradlew copyWebsiteDocs
104
- cd website
105
- npm install && npm run build
138
+ - uses : actions/download-artifact@v4
139
+ with :
140
+ name : site
141
+ path : website/dist
106
142
107
143
- name : Deploy snapshot website
108
144
uses : JamesIves/github-pages-deploy-action@releases/v3
0 commit comments