-
-
Notifications
You must be signed in to change notification settings - Fork 142
41 lines (39 loc) · 1.17 KB
/
addon-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish Addon Docs
on:
push:
branches:
- main
- master
tags:
- "**"
jobs:
build:
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for tags and conditionally exit
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
fi
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
- name: Deploy Docs
run: pnpm ember deploy production