From a45b2bf9b7553f4a63d96f02b52a843cf1c14991 Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Wed, 26 Mar 2025 03:04:28 +0300 Subject: [PATCH] =?UTF-8?q?=E2=AD=90=20feat(ci):=20Deploy=20nestri=20landi?= =?UTF-8?q?ng=20page=20(#214)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This attempts to deploy `apps/www` to the new CF account using cloudflare pages project ## Related Issues ## Type of Change - [ ] Bug fix (non-breaking change) - [x] New feature (non-breaking change) - [ ] Breaking change (fix or feature that changes existing functionality) - [ ] Documentation update - [ ] Other (please describe): ## Checklist - [ ] I have updated relevant documentation - [ ] My code follows the project's coding style - [ ] My changes generate no new warnings/errors ## Notes for Reviewers ## Screenshots/Demo ## Additional Context --- .github/workflows/www.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/www.yml 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