Skip to content

Do docs check in one step #7289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2023
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
15 changes: 8 additions & 7 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,16 @@ jobs:
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
- name: Check for changes requiring a reference doc publish
id: docs-check
# If a diff is found (length of DIFF_CONTENTS > 0) it will write DOCS_NEEDED=true
run: |
LAST_PUBLISHED_VERSION=$(npm info firebase version)
git diff --exit-code firebase@$LAST_PUBLISHED_VERSION HEAD docs-devsite
- name: No diff, docs not needed
if: ${{ success() }}
run: echo "DOCS_NEEDED=false" >> $GITHUB_STATE
- name: Diff returned something, docs are needed
if: ${{ failure() }}
run: echo "DOCS_NEEDED=true" >> $GITHUB_STATE
DIFF_CONTENTS=$(git diff firebase@$LAST_PUBLISHED_VERSION HEAD docs-devsite)
if [ -n "$DIFF_CONTENTS" ]
then
echo "DOCS_NEEDED=true" >> $GITHUB_OUTPUT
else
echo "DOCS_NEEDED=false" >> $GITHUB_OUTPUT
fi
- name: Log to release tracker
# Sends release information to cloud functions endpoint of release tracker.
if: ${{ always() }}
Expand Down