Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/actions/build-website/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,21 @@ runs:
run: |
make init

# Download pre-built library docs from GitHub Release
# The library-docs-generate.yml workflow must have run at least once
# Download pre-built library docs from the latest GitHub Release
# The generate-library.yml workflow must have run at least once
- name: "Download Pre-built Library Docs"
shell: bash
env:
GH_TOKEN: ${{ inputs.repo_access_token }}
run: |
echo "Downloading pre-built library docs from GitHub Release..."
gh release download library-docs-latest \
echo "Finding latest library-docs release..."
LATEST_TAG=$(gh release list --repo ${{ github.repository }} --limit 50 | grep "library-docs-" | head -1 | awk '{print $1}')
if [ -z "$LATEST_TAG" ]; then
echo "Error: No library-docs release found. Run the 'Generate Library' workflow first."
exit 1
fi
echo "Downloading from release: ${LATEST_TAG}"
gh release download "${LATEST_TAG}" \
--repo ${{ github.repository }} \
--pattern "library-docs.tar.gz" \
--dir /tmp
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/generate-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,28 @@ jobs:
docs/modules/library \
docs/github-actions/library

- name: Delete Existing Release
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete library-docs-latest --yes || true
git push origin :refs/tags/library-docs-latest || true
VERSION="0.0.$(date -u +'%Y%m%d%H%M%S')"
gh release create "library-docs-${VERSION}" \
--title "Library Docs ${VERSION}" \
--notes "Pre-built library documentation for fast preview builds. Generated $(date -u +'%Y-%m-%d %H:%M:%S UTC')." \
--latest \
library-docs.tar.gz

- name: Create Release
- name: Cleanup Old Releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create library-docs-latest \
--title "Library Docs (Latest)" \
--notes "Pre-built library documentation for fast preview builds. Generated $(date -u +'%Y-%m-%d %H:%M:%S UTC')." \
--prerelease \
library-docs.tar.gz
echo "Cleaning up old library-docs releases (keeping last 5)..."
gh release list --repo ${{ github.repository }} --limit 100 \
| grep "library-docs-" \
| tail -n +6 \
| awk '{print $1}' \
| while read tag; do
echo "Deleting release: ${tag}"
gh release delete "${tag}" --yes --cleanup-tag || true
done
echo "Cleanup complete"
Loading