diff --git a/.github/workflows/www.yml b/.github/workflows/www.yml new file mode 100644 index 00000000..9cb366cd --- /dev/null +++ b/.github/workflows/www.yml @@ -0,0 +1,34 @@ +name: Build the website + +on: + push: + paths: + -" apps/www/**" + - ".github/workflows/www.yml" + +jobs: + deploy-preview: + runs-on: ubuntu-latest + defaults: + run: + working-directory: "apps/www" + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: Install dependencies + run: bun install + - name: Build Project Artifacts + run: bun run build + - name: Deploy Project Artifacts to Cloudflare + uses: cloudflare/wrangler-action@v3 + with: + packageManager: bun + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + # workingDirectory: "apps/www" + wranglerVersion: "3.93.0" + command: pages deploy ./dist --project-name=${{ vars.CF_PAGES_PROJECT_NAME }} + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} \ No newline at end of file