Skip to content

Commit

Permalink
Update addon-docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Dec 6, 2024
1 parent 20eecd6 commit e9ae07b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/addon-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,31 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for tags and conditionally exit
- name: Check for tags and set short-circuit condition
id: check-tags
run: |
# Fetch tags pointing to the current commit
TAGS=$(git tag --points-at $GITHUB_SHA)
echo "Tags found: $TAGS"
# Check if a tag exists and if the ref is 'refs/heads/main' or 'refs/heads/master'
if [ -n "$TAGS" ] && ([[ "${GITHUB_REF}" == "refs/heads/main" ]] || [[ "${GITHUB_REF}" == "refs/heads/master" ]]); then
echo "Commit has a tag and is pushed to the main or master branch. Exiting."
exit 0
echo "SHORT_CIRCUIT=true" >> $GITHUB_ENV
else
echo "SHORT_CIRCUIT=false" >> $GITHUB_ENV
fi
- uses: pnpm/action-setup@v4
if: env.SHORT_CIRCUIT == 'false'
with:
version: 9
- uses: actions/setup-node@v4
if: env.SHORT_CIRCUIT == 'false'
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
if: env.SHORT_CIRCUIT == 'false'
run: pnpm install --no-lockfile
- name: Deploy Docs
run: |
cd test-app
pnpm ember deploy production
if: env.SHORT_CIRCUIT == 'false'
run: pnpm ember deploy production

0 comments on commit e9ae07b

Please sign in to comment.