diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f49995..73a247c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 .