Skip to content

Commit

Permalink
Uploading artifacts of claat
Browse files Browse the repository at this point in the history
  • Loading branch information
ikarenkov committed Oct 23, 2024
1 parent e745971 commit 4cfc582
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ jobs:
- name: Generate CodeLabs content
run: |
mkdir -p codelabs-generated
claat export -o codelabs-generated codelabs/workshop/workshop-codelab.md
claat export codelabs/workshop/workshop-codelab.md -o codelabs-generated || exit 1
# Verify that CodeLabs files were generated
- name: List generated CodeLabs files
run: ls -la codelabs-generated

# Writerside build step
- name: Build docs using Writerside Docker builder
Expand All @@ -47,12 +51,26 @@ jobs:
artifact: ${{ env.ARTIFACT }}
docker-version: ${{ env.DOCKER_VERSION }}

- name: Save artifact with build results
# Unzip the Writerside artifact
- name: Unzip Writerside artifact
run: unzip -O UTF-8 -qq artifacts/${{ env.ARTIFACT }} -d dir

# Combine CodeLabs and Writerside output
- name: Copy CodeLabs to Writerside output
run: |
if [ -d "codelabs-generated" ] && [ "$(ls -A codelabs-generated)" ]; then
cp -R codelabs-generated/* dir/
else
echo "No CodeLabs content generated."
exit 1
fi
# Save combined Writerside + CodeLabs artifact
- name: Save combined artifact with Writerside and CodeLabs
uses: actions/upload-artifact@v4
with:
name: docs
path: |
artifacts/${{ env.ARTIFACT }}
path: dir
retention-days: 7

deploy:
Expand All @@ -69,16 +87,11 @@ jobs:
with:
name: docs

- name: Unzip Writerside artifact
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir

# Inject CodeLab HTML into Writerside docs
- name: Copy CodeLabs to Writerside output
run: cp -R codelabs-generated/* dir/

# Set up for GitHub Pages deployment
- name: Setup Pages
uses: actions/[email protected]

# Upload to GitHub Pages
- name: Upload artifact
uses: actions/[email protected]
with:
Expand Down

0 comments on commit 4cfc582

Please sign in to comment.