-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ca3fc5
commit fb3ee0e
Showing
6 changed files
with
288 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Deploy to Cloudflare Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to Cloudflare Pages | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
deployments: write | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Set up Gleam | ||
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: "27.0" | ||
gleam-version: "1.5.1" | ||
rebar3-version: "3" | ||
- name: Install dependencies | ||
run: gleam deps download | ||
- name: Build app | ||
run: gleam run -m lustre/dev build app --minify | ||
- name: Copy output to dist | ||
run: | | ||
mkdir -p dist | ||
cp index.html dist/index.html | ||
cp -r priv dist/priv | ||
- name: Update path in index.html to use minified app | ||
run: sed -i 's|priv/static/squared_away.mjs|priv/static/squared_away.min.mjs|' dist/index.html | ||
- name: Deploy with Wrangler | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: pages deploy dist --project-name squared-away |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.