From 4e9fe9216dfe382d8f2ff9d49d15d3ddf512da89 Mon Sep 17 00:00:00 2001 From: Gavin Morrow Date: Thu, 30 Jul 2026 22:36:41 -0400 Subject: [PATCH] Create github action to deploy to pages --- .github/workflows/build-and-deploy.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build-and-deploy.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..3a0a31e --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,38 @@ +name: Build and Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + name: Deploy to GitHub Pages + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + pages: write + id-token: write + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Gleam + uses: erlef/setup-beam@v1 + with: + otp-version: "28.0" + gleam-version: "1.12.0" + rebar3-version: "3" + - name: Install dependencies + run: gleam deps download + - name: Build app + run: gleam run -m lustre/dev build --minify --outdir=dist + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "dist" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 -- 2.51.2