58
58
run : ${GITHUB_WORKSPACE}/.github/scripts/show-env.sh
59
59
60
60
- name : Publish Apple, Linux, JVM & JS targets
61
- working-directory : arrow-libs
62
61
run : |
63
62
./gradlew publishToSonatype
64
63
echo "$(cat $BASEDIR/gradle.properties | grep projects.version | cut -d'=' -f2) Apple, Linux, JVM & JS deployed!"
96
95
shell : bash
97
96
98
97
- name : Publish Windows
99
- working-directory : arrow-libs
100
98
run : |
101
99
./gradlew publishToSonatype
102
100
echo "$(cat gradle.properties | grep projects.version | cut -d'=' -f2) MingwX64 deployed!"
@@ -106,14 +104,14 @@ jobs:
106
104
107
105
publish_doc :
108
106
env :
109
- JAVA_OPTS : -Xms2g -Xmx4g
110
- GRADLE_OPTS : " -Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8 -Dorg.gradle.parallel=false"
111
107
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
112
- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
113
- S3_BUCKET : ${{ secrets.S3_BUCKET }}
114
108
AWS_CLOUDFRONT_ID : ${{ secrets.AWS_CLOUDFRONT_ID }}
115
109
AWS_DEFAULT_REGION : eu-west-1
110
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
111
+ GRADLE_OPTS : " -Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8 -Dorg.gradle.parallel=false"
112
+ JAVA_OPTS : -Xms2g -Xmx4g
116
113
JEKYLL_ENV : production
114
+ S3_BUCKET : ${{ secrets.S3_BUCKET }}
117
115
118
116
runs-on : macos-latest
119
117
timeout-minutes : 60
@@ -138,90 +136,69 @@ jobs:
138
136
run : |
139
137
mkdir $BASEDIR/logs
140
138
brew install tree
141
- bundle install --gemfile Gemfile --path vendor/bundle
142
-
143
- - name : " Assemble"
144
- working-directory : arrow-libs
145
- run : |
146
- echo "Additional step to avoid a random failure with Dokka 0.10.0 and MPP"
147
- ./gradlew assemble
139
+ bundle config set --local path 'vendor/bundle'
140
+ bundle install --gemfile Gemfile
148
141
149
142
- name : " Create API doc"
150
- working-directory : arrow-libs
151
- run : ./gradlew --no-parallel dokkaGfm
152
-
153
- - name : " Validate documentation"
154
- working-directory : arrow-site
155
- run : ./gradlew runAnk
143
+ run : ./gradlew dokkaGfm
156
144
157
145
- name : " Landing page: build"
158
- if : ${{ env.NEW_RELEASE_VERSION_EXISTS == '1' && github.ref == 'refs/heads/main' }}
159
146
working-directory : arrow-site
147
+ if : ${{ github.ref == 'refs/heads/main' }}
160
148
run : |
161
- bundle exec jekyll build -b docs -s build/site
149
+ bundle exec jekyll build -b docs -s docs
162
150
tree _site > $BASEDIR/logs/content.log
163
151
164
152
- name : " Landing page: publish"
165
- if : ${{ env.NEW_RELEASE_VERSION_EXISTS == '1' && github.ref == 'refs/heads/main' }}
166
153
working-directory : arrow-site
154
+ if : ${{ github.ref == 'refs/heads/main' }}
167
155
run : |
168
156
echo ">>> Landing page" >> $BASEDIR/logs/aws_sync.log
169
157
${GITHUB_WORKSPACE}/.github/scripts/publish-landing-page.sh
170
158
171
- - name : " Remove index for versions"
172
- working-directory : arrow-site
173
- run : rm -f build/site/index.md
174
-
175
- - name : " Latest release: build (docs/)"
176
- if : ${{ env.NEW_RELEASE_VERSION_EXISTS == '1' && github.ref == 'refs/heads/main' }}
177
- working-directory : arrow-site
178
- run : |
179
- bundle exec jekyll build -b docs -s build/site
180
- tree _site > $BASEDIR/logs/content_docs.log
181
-
182
- - name : " Latest release: publish (docs/)"
183
- if : ${{ env.NEW_RELEASE_VERSION_EXISTS == '1' && github.ref == 'refs/heads/main' }}
159
+ - name : " Latest release: publish (/docs)"
184
160
working-directory : arrow-site
161
+ if : ${{ github.ref == 'refs/heads/main' }}
185
162
run : |
186
163
echo ">>> Latest release" >> $BASEDIR/logs/aws_sync.log
187
164
${GITHUB_WORKSPACE}/.github/scripts/publish-latest-release.sh
188
165
189
- - name : " Latest release: build release directory (docs/<major.minor>)"
190
- if : env.NEW_RELEASE_VERSION_EXISTS == '1'
166
+ - name : " Latest release: build release directory (/docs/<major.minor>)"
191
167
working-directory : arrow-site
168
+ if : ${{ github.ref == 'refs/heads/main' }}
192
169
run : |
193
170
SHORT_VERSION=$(echo $RELEASE_VERSION | cut -d. -f1-2)
194
- bundle exec jekyll build -b docs/${SHORT_VERSION} -s build/site
171
+ bundle exec jekyll build -b docs/${SHORT_VERSION} -s docs
195
172
tree _site > $BASEDIR/logs/content_docs-${SHORT_VERSION}.log
196
173
197
- - name : " Latest release: publish release directory (docs/<major.minor>)"
198
- if : env.NEW_RELEASE_VERSION_EXISTS == '1'
174
+ - name : " Latest release: publish release directory (/docs/<major.minor>)"
199
175
working-directory : arrow-site
176
+ if : ${{ github.ref == 'refs/heads/main' }}
200
177
run : |
201
178
SHORT_VERSION=$(echo $RELEASE_VERSION | cut -d. -f1-2)
202
179
echo ">>> $SHORT_VERSION VERSION" >> $BASEDIR/logs/aws_sync.log
203
180
if [ "${SHORT_VERSION}" != "" ]; then
204
- aws s3 sync _site s3://$S3_BUCKET/docs/$SHORT_VERSION --delete >> $BASEDIR/logs/aws_sync.log
181
+ aws s3 sync _site s3://$S3_BUCKET/docs/$SHORT_VERSION --delete --exclude "index.html" >> $BASEDIR/logs/aws_sync.log
205
182
else
206
183
exit 1
207
184
fi
208
185
209
186
- name : " Next version: build (/docs/next)"
210
- if : ${{ github.ref == 'refs/heads/main' }}
211
187
working-directory : arrow-site
188
+ if : ${{ github.ref == 'refs/heads/main' }}
212
189
run : |
213
- bundle exec jekyll build -b docs/next -s build/site
190
+ bundle exec jekyll build -b docs/next -s docs
214
191
tree _site > $BASEDIR/logs/content_docs-next.log
215
192
216
193
- name : " Next version: publish (/docs/next)"
217
- if : ${{ github.ref == 'refs/heads/main' }}
218
194
working-directory : arrow-site
195
+ if : ${{ github.ref == 'refs/heads/main' }}
219
196
run : |
220
197
echo ">>> NEXT VERSION" >> $BASEDIR/logs/aws_sync.log
221
- aws s3 sync _site s3://$S3_BUCKET/docs/next --delete >> $BASEDIR/logs/aws_sync.log
198
+ aws s3 sync _site s3://$S3_BUCKET/docs/next --delete --exclude "index.html" >> $BASEDIR/logs/aws_sync.log
222
199
223
200
- name : " Site: publish sitemap.xml"
224
- if : ${{ env.NEW_RELEASE_VERSION_EXISTS == '1' && github.ref == 'refs/heads/main' }}
201
+ if : ${{ github.ref == 'refs/heads/main' }}
225
202
run : |
226
203
${GITHUB_WORKSPACE}/.github/scripts/create-sitemap.sh > sitemap.xml
227
204
aws s3 cp sitemap.xml s3://$S3_BUCKET/sitemap.xml >> $BASEDIR/logs/aws_sync.log
0 commit comments