Skip to content

Commit

Permalink
[skip ci] feat: publish playground in release
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkz committed Feb 9, 2025
1 parent 4cee2c6 commit 2a070b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
if: |
!startsWith(github.event.head_commit.message , 'chore: release')
startsWith(github.event.head_commit.message , 'chore: release playground')
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
permissions:
contents: write
pull-requests: write
deployments: write
steps:
- uses: actions/checkout@v4
- name: Install pnpm
Expand All @@ -32,6 +33,8 @@ jobs:
version: '0.4.27'
- name: Gen APKG
run: pnpm run package
- name: Build playground
run: pnpm run pg-build

- name: Create Release Pull Request or Tag
id: changesets
Expand All @@ -52,3 +55,13 @@ jobs:
tag: ${{format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version)}}
allowUpdates: true
omitBodyDuringUpdate: true

- name: Publish playground
if: steps.changesets.outputs.published == 'true'
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'ikkz-template'
directory: 'playground/dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2a070b8

Please sign in to comment.