From 9b5067498599855efdc6b71b2b4d2ce30b3bbdb0 Mon Sep 17 00:00:00 2001 From: Southpaw Date: Fri, 29 Nov 2024 23:17:14 +0000 Subject: [PATCH] Revert "Update CI from deprecated pages action to Wrangler action (#260)" This reverts commit fd8b3a5dc343d12d6a3e95aba86c2b4546589c13. The world wasn't ready (I think it's https://github.com/cloudflare/wrangler-action/issues/311). [skip ci] --- .github/workflows/publish-website.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-website.yaml b/.github/workflows/publish-website.yaml index 15d209a1..33b6dcd4 100644 --- a/.github/workflows/publish-website.yaml +++ b/.github/workflows/publish-website.yaml @@ -42,14 +42,16 @@ jobs: path: functions run-id: ${{ env.GITHUB_RUN_ID }} github-token: ${{ env.GITHUB_TOKEN }} - - # The following hack is required because Cloudflare can't compile the workers in the functions/ directory separately from deploying, so it needs the packages they use in order to compile them at deployment time, but installing *everything* in package.json would be a waste. The build and publish steps can't go in the same job, because PR Previews have to build the site without publishing it (since they can't access secrets). Hopefully we can remove the need for this in the future by switching to Astro Actions, which should be compiled with the rest of the site. + + # The following hack is required because Cloudflare can't compile the workeers in the functions/ directory seperately from deploying, so it needs the packages they use in order to compile them at deployment time, but installing *everything* in package.json would be a waste. The build and publish steps can't go in the same job, because PR Previews have to build the site without publishing it (since they can't access secrets). Hopefully we can remove the need for this in the future by switching to Astro Actions, which should be compiled with the rest of the site. - name: Install packages required by functions run: npm install xml-js semver-sort string_decoder buffer - name: Publish to Cloudflare Pages id: cloudflare-publish # This step needs an ID because its outputs may be needed in subsequent jobs. - uses: cloudflare/wrangler-action@v3 + uses: cloudflare/pages-action@v1 with: apiToken: ${{ env.CLOUDFLARE_API_TOKEN }} accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy dist --project-name quiltmc-org --branch ${{ inputs.branch }} + projectName: quiltmc-org + directory: dist + branch: ${{ inputs.branch }}