-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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: | ||
|