Skip to content

Commit

Permalink
Add deploy job for web
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoya committed Oct 3, 2024
1 parent 86e45cc commit c4f6734
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,27 @@ jobs:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy
deploy-web:
name: Deploy Web
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/web
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9 # package.jsonにpackageManagerをつけてもサブディレクトリのせいか、これがないとエラーになる
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
packageManager: pnpm
workingDirectory: packages/web # working-directoryを付けていても必要
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy

0 comments on commit c4f6734

Please sign in to comment.