diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml new file mode 100644 index 000000000..0d7fc07cc --- /dev/null +++ b/.github/workflows/deploy-app.yml @@ -0,0 +1,34 @@ +name: Deploy App + +on: + push: + branches: [main] + paths: + - 'packages/app/**' + - 'packages/server/src/**' + - '.github/workflows/deploy-app.yml' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm install --workspace=@paseo/app --include-workspace-root + + - name: Typecheck + run: npm run typecheck --workspace=@paseo/app + + - name: Build and deploy to Cloudflare Pages + run: npm run deploy:web --workspace=@paseo/app + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: 10ed39a1dbf316e30abd0c409bed40d6 diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml new file mode 100644 index 000000000..5909ff06b --- /dev/null +++ b/.github/workflows/deploy-website.yml @@ -0,0 +1,32 @@ +name: Deploy Website + +on: + push: + branches: [main] + paths: + - 'packages/website/**' + - '.github/workflows/deploy-website.yml' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm install --workspace=@paseo/website --include-workspace-root + + - name: Typecheck + run: npm run typecheck --workspace=@paseo/website + + - name: Deploy to Cloudflare Workers + run: npm run deploy --workspace=@paseo/website + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}