Skip to content

Commit 43a52a6

Browse files
committed
Uploading artifacts of claat
1 parent e745971 commit 43a52a6

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/build-docs.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ jobs:
3939
mkdir -p codelabs-generated
4040
claat export -o codelabs-generated codelabs/workshop/workshop-codelab.md
4141
42+
# Verify that CodeLabs files were generated
43+
- name: List generated CodeLabs files
44+
run: ls -la codelabs-generated
45+
4246
# Writerside build step
4347
- name: Build docs using Writerside Docker builder
4448
uses: JetBrains/writerside-github-action@v4
@@ -47,12 +51,26 @@ jobs:
4751
artifact: ${{ env.ARTIFACT }}
4852
docker-version: ${{ env.DOCKER_VERSION }}
4953

50-
- name: Save artifact with build results
54+
# Unzip the Writerside artifact
55+
- name: Unzip Writerside artifact
56+
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir
57+
58+
# Combine CodeLabs and Writerside output
59+
- name: Copy CodeLabs to Writerside output
60+
run: |
61+
if [ -d "codelabs-generated" ] && [ "$(ls -A codelabs-generated)" ]; then
62+
cp -R codelabs-generated/* dir/
63+
else
64+
echo "No CodeLabs content generated."
65+
exit 1
66+
fi
67+
68+
# Save combined Writerside + CodeLabs artifact
69+
- name: Save combined artifact with Writerside and CodeLabs
5170
uses: actions/upload-artifact@v4
5271
with:
5372
name: docs
54-
path: |
55-
artifacts/${{ env.ARTIFACT }}
73+
path: dir
5674
retention-days: 7
5775

5876
deploy:
@@ -69,16 +87,11 @@ jobs:
6987
with:
7088
name: docs
7189

72-
- name: Unzip Writerside artifact
73-
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
74-
75-
# Inject CodeLab HTML into Writerside docs
76-
- name: Copy CodeLabs to Writerside output
77-
run: cp -R codelabs-generated/* dir/
78-
90+
# Set up for GitHub Pages deployment
7991
- name: Setup Pages
8092
uses: actions/[email protected]
8193

94+
# Upload to GitHub Pages
8295
- name: Upload artifact
8396
uses: actions/[email protected]
8497
with:

0 commit comments

Comments
 (0)