Skip to content

Commit e9ae07b

Browse files
Update addon-docs.yml
1 parent 20eecd6 commit e9ae07b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/addon-docs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,31 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
token: ${{ secrets.GITHUB_TOKEN }}
20-
- name: Check for tags and conditionally exit
20+
- name: Check for tags and set short-circuit condition
21+
id: check-tags
2122
run: |
2223
# Fetch tags pointing to the current commit
2324
TAGS=$(git tag --points-at $GITHUB_SHA)
2425
echo "Tags found: $TAGS"
25-
26+
2627
# Check if a tag exists and if the ref is 'refs/heads/main' or 'refs/heads/master'
2728
if [ -n "$TAGS" ] && ([[ "${GITHUB_REF}" == "refs/heads/main" ]] || [[ "${GITHUB_REF}" == "refs/heads/master" ]]); then
28-
echo "Commit has a tag and is pushed to the main or master branch. Exiting."
29-
exit 0
29+
echo "SHORT_CIRCUIT=true" >> $GITHUB_ENV
30+
else
31+
echo "SHORT_CIRCUIT=false" >> $GITHUB_ENV
3032
fi
3133
- uses: pnpm/action-setup@v4
34+
if: env.SHORT_CIRCUIT == 'false'
3235
with:
3336
version: 9
3437
- uses: actions/setup-node@v4
38+
if: env.SHORT_CIRCUIT == 'false'
3539
with:
3640
node-version: 18
3741
cache: pnpm
3842
- name: Install Dependencies
43+
if: env.SHORT_CIRCUIT == 'false'
3944
run: pnpm install --no-lockfile
4045
- name: Deploy Docs
41-
run: |
42-
cd test-app
43-
pnpm ember deploy production
46+
if: env.SHORT_CIRCUIT == 'false'
47+
run: pnpm ember deploy production

0 commit comments

Comments
 (0)