Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/web_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ on:
push:
branches:
- main
pull_request:

jobs:
production-deploy:
name: Deploy
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: read
deployments: write
Expand Down Expand Up @@ -47,44 +45,3 @@ jobs:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_KEY }}
command: pages deploy dist --project-name=midi-footcontroller
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

preview-deploy:
name: Deploy (Preview)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.ref != 'refs/heads/main'
permissions:
contents: read
deployments: write
defaults:
run:
working-directory: web
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24.x'
check-latest: true
cache-dependency-path: web/pnpm-lock.yaml

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: 'web/package.json'

- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm build

- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: web
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_KEY }}
command: pages deploy dist --project-name=midi-footcontroller --branch=${{ github.head_ref }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/web_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Web

on:
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
preview-deploy:
name: Preview
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
defaults:
run:
working-directory: web
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24.x'
check-latest: true
cache-dependency-path: web/pnpm-lock.yaml

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: 'web/package.json'

- name: Install dependencies
run: pnpm install

- name: Build project
run: pnpm build

- name: Deploy Preview
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: web
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_KEY }}
command: pages deploy dist --project-name=midi-footcontroller --branch=${{ github.head_ref }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
Loading