Skip to content
Merged
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
19 changes: 19 additions & 0 deletions .github/workflows/nightly-docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:

- name: Get latest nightly tag
id: get_tag
env:
GH_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
# Manual trigger with specific tag
Expand All @@ -51,6 +53,23 @@ jobs:
fi
fi

# Check if the GitHub release exists and is published
if ! gh release view "$NIGHTLY_TAG" --json isDraft,name 2>/dev/null; then
echo "GitHub release for $NIGHTLY_TAG does not exist. Skipping docs release."
echo "should_run=false" >> $GITHUB_OUTPUT
exit 0
fi

# Check if the release is a draft (not published)
IS_DRAFT=$(gh release view "$NIGHTLY_TAG" --json isDraft --jq '.isDraft')
if [ "$IS_DRAFT" = "true" ]; then
echo "GitHub release for $NIGHTLY_TAG is a draft (not published). Skipping docs release."
echo "should_run=false" >> $GITHUB_OUTPUT
exit 0
fi

echo "GitHub release for $NIGHTLY_TAG is published."

# Check if we already have docs for this nightly version
DOCS_VERSION_DIR="docs/versioned_docs/version-$NIGHTLY_TAG"
BB_DOCS_VERSION_DIR="barretenberg/docs/versioned_docs/version-$NIGHTLY_TAG"
Expand Down
Loading