diff --git a/.github/workflows/deploy-client.yml b/.github/workflows/deploy-client.yml deleted file mode 100644 index ff97108..0000000 --- a/.github/workflows/deploy-client.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Deploy client to Cloudflare Pages - -on: - push: - tags: - - "*.*.*" - -jobs: - deploy: - name: Build and deploy SPA - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - uses: actions/checkout@v4 - - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.RIOTBYTE_BOT_APP_ID }} - private-key: ${{ secrets.RIOTBYTE_BOT_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - # Empty = installation-wide; needed to fetch @riotbyte-com - # packages published from sibling repos. - repositories: "" - - # pnpm version is pinned via packageManager in root package.json - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: pnpm - - - name: Install dependencies - env: - NPM_AUTH_TOKEN: ${{ steps.app-token.outputs.token }} - run: pnpm install --frozen-lockfile - - - name: Build and deploy - env: - NPM_AUTH_TOKEN: ${{ steps.app-token.outputs.token }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - run: ./ci/deploy-client.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7332a6f..1baf543 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Build and publish Docker images +name: Release on: push: @@ -7,6 +7,7 @@ on: jobs: build-and-push: + name: Build and publish Docker images runs-on: ubuntu-latest permissions: contents: read @@ -30,3 +31,41 @@ jobs: # and we want consistent token handling across all workflows. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./ci/build-images.sh + + deploy-client: + name: Build and deploy SPA to Cloudflare Pages + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.RIOTBYTE_BOT_APP_ID }} + private-key: ${{ secrets.RIOTBYTE_BOT_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + # Empty = installation-wide; needed to fetch @riotbyte-com + # packages published from sibling repos. + repositories: "" + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - name: Install dependencies + env: + NPM_AUTH_TOKEN: ${{ steps.app-token.outputs.token }} + run: pnpm install --frozen-lockfile + + - name: Build and deploy + env: + NPM_AUTH_TOKEN: ${{ steps.app-token.outputs.token }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + run: ./ci/deploy-client.sh