Skip to content

Commit

Permalink
Merge pull request #2811 from swcurran/docs-by-branch
Browse files Browse the repository at this point in the history
Eliminate the double workflow event
  • Loading branch information
swcurran authored Feb 23, 2024
2 parents 8ca1ab3 + f866ff3 commit 73dd7ed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
- main
- docs-v*

create:
# Publish any `docs-v` branches -- check below to not run on other created branches

permissions:
contents: write

Expand Down Expand Up @@ -39,10 +36,8 @@ jobs:
# Strip git ref prefix from version
echo "${{ github.ref }}"
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# If this is for a branch other than main or one starting with "docs-v" then exit happily
[[ "$VERSION" != "main" && "$VERSION" != "docs-v"* ]] && echo Not a docs branch...exiting && exit 0
# Strip "docs-v" prefix from branch name
[[ "$VERSION" == "docs-v"* ]] && ALIAS=$(echo $VERSION | sed -e 's/^docs-v//')
[[ "$VERSION" == "docs-v"* ]] && ALIAS=$(echo $VERSION | sed -e 's/^docs-v//') && VERSION=${ALIAS}
# Copy all of the root level md files into the docs folder for deployment, tweaking the relative paths
for i in *.md; do sed -e "s#docs/#./#g" $i >docs/$i; done
# Populate overrides for the current version, and then remove to not apply if VERSION is main branch
Expand Down

0 comments on commit 73dd7ed

Please sign in to comment.