@@ -131,6 +131,24 @@ jobs:
131131 target/release-lto/git-remote-codecommit.exe
132132 compression-level : 0
133133
134+ - name : Build Documentation
135+ if : ${{ matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly'}}
136+ run : cargo doc --verbose --workspace --document-private-items --frozen
137+
138+ - name : Print diagnostics
139+ if : ${{ matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly'}}
140+ run : |
141+ find ./target/doc -ls
142+ du -hd1 ./target/doc | sort -h
143+
144+ - name : Upload Documentation as GitHub artifact
145+ if : ${{ matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly'}}
146+ 147+ with :
148+ name : docs
149+ path : target/doc
150+ compression-level : 9
151+
134152 - name : Configure AWS credentials
135153 if : github.repository == 'demosdemon/git-remote-codecommit'
136154 uses :
aws-actions/[email protected] @@ -216,49 +234,11 @@ jobs:
216234 parallel-finished : true
217235 carryforward : ${{ steps.set_carryforward.outputs.carryforward }}
218236
219- build-docs :
220- name : Build Documentation
221- needs : [check-and-test]
222- # needless matrix to make copy-pasting common steps easier
223- strategy :
224- matrix :
225- os :
226- - ubuntu-latest
227- rust :
228- - nightly
229- runs-on : ${{ matrix.os }}
230- steps :
231- - name : Checkout
232- uses : actions/checkout@v4
233-
234- - name : Install Rust (${{ matrix.rust }})
235- uses : actions-rust-lang/setup-rust-toolchain@v1
236- with :
237- toolchain : ${{ matrix.rust }}
238- cache-shared-key : ${{ matrix.os }}-${{ matrix.rust }}
239-
240- - name : Fetch cargo dependencies
241- run : cargo fetch --verbose --locked
242-
243- - name : Build Documentation
244- run : cargo doc --verbose --workspace --document-private-items --frozen
245-
246- - name : Print diagnostics
247- run : |
248- find ./target/doc -ls
249- du -hd1 ./target/doc | sort -h
250-
251- - name : Upload Documentation as GitHub artifact
252- 253- with :
254- name : docs
255- path : target/doc
256- compression-level : 9
257-
258237 push-to-codecommit :
238+ if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
259239 concurrency : push-to-codecommit
260240 name : Push to CodeCommit
261- needs : [finalize-coveralls-run, build-docs, check-and-test ]
241+ needs : [finalize-coveralls-run]
262242 runs-on : ubuntu-latest
263243 env :
264244 RUST_BACKTRACE : 1
@@ -270,7 +250,6 @@ jobs:
270250 fetch-depth : 0 # need the history in order to push to CodeCommit
271251
272252 - name : Configure AWS credentials
273- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
274253 uses :
aws-actions/[email protected] 275254 with :
276255 role-to-assume : arn:aws:iam::339712996426:role/github-git-remote-codecommit
@@ -292,7 +271,6 @@ jobs:
292271 run : git-remote-codecommit --version
293272
294273 - name : Push to CodeCommit
295- if : github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'demosdemon/git-remote-codecommit'
296274 run : |
297275 git remote add aws codecommit://git-remote-codecommit
298276 git push aws --tags
0 commit comments