refactor: rename release workflow and split into deploy and publish steps

This commit is contained in:
Prad Nukala 2024-12-06 14:49:21 -05:00
parent 229071ec6a
commit d50e92d4cd

View File

@ -1,4 +1,3 @@
# This workflow will create a GitHub release every time a tag is pushed
name: Deploy CDN WebComponents
on:
@ -7,10 +6,40 @@ on:
- "master"
jobs:
release:
deploy-docs:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Build
run: bun run build
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: _site
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: deploy-docs
permissions:
contents: write
runs-on: ubuntu-latest
if: contains(github.event.head_commit.modified, 'src/')
steps:
- name: Checkout code
uses: actions/checkout@v3
@ -31,13 +60,6 @@ jobs:
- name: Build
run: bun run build
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: _site
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Automated Version Bump and Release'
run: |
git add .