Skip to content

Commit

Permalink
fix: deploy to CloudFlare Pages (#47)
Browse files Browse the repository at this point in the history
* deploy to CloudFlare

* remove $i18n alias

Cloudflare can't seem to parse it when deploying to staging

* Revert "remove $i18n alias"

This reverts commit 75abf61.

* generate i18n artifacts before build

* Update app.d.ts

* debug: VITE_ env variable

* now do PUBLIC_GAME_VERSION

* Revert "now do PUBLIC_GAME_VERSION"

This reverts commit 46a9f4a.

* Revert "debug: VITE_ env variable"

This reverts commit 7809949.

* Revert "Update app.d.ts"

This reverts commit 51619a4.

* Update app.d.ts

* debug: are env variables defined during build?

* debug: get env variable from process.env

* debug: try platform.env

* Revert "debug: try platform.env"

This reverts commit 9416c26.

* Revert "debug: get env variable from process.env"

This reverts commit 32044cb.

* Revert "debug: are env variables defined during build?"

This reverts commit 7052328.

* revert changes to `app.d.ts`

* revert typesafe-i18n during build command

* deploy to CloudFlare pages using GH actions

Remove deployment to S3

* debug: bypass semantic release for now

* add wrangler.toml config

* maybe use cwd (?)

* use publish command

* back to deploy but with working dir

* restore semantic release and action branch

* revert export in app.d.ts

* fix broken image for Reykjavik
  • Loading branch information
fmaclen authored Oct 16, 2023
1 parent f2791d2 commit 2516d09
Show file tree
Hide file tree
Showing 5 changed files with 969 additions and 692 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & deploy to S3
name: Build & deploy

on:
push:
Expand Down Expand Up @@ -42,13 +42,9 @@ jobs:
PUBLIC_PLAUSIBLE_DOMAIN: ${{ secrets.PUBLIC_PLAUSIBLE_DOMAIN }}
PUBLIC_GAME_VERSION: ${{ steps.release.outputs.version }}

- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
- name: Deploy to CloudFlare Pages
uses: cloudflare/wrangler-action@v3
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: 'build'
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy .svelte-kit/cloudflare --project-name julia-sanfrancisco
Loading

0 comments on commit 2516d09

Please sign in to comment.