From 0cc43ba133cf867d0a0093ea544fc706b9cda587 Mon Sep 17 00:00:00 2001 From: Ethan Holz Date: Tue, 17 Mar 2026 15:57:44 -0600 Subject: [PATCH 1/2] ci: add support for a full-pages build --- .github/workflows/build-push.yml | 37 ++++++++++++++++++++++++++ .github/workflows/prod-cloudflare.yaml | 21 +++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/workflows/build-push.yml create mode 100644 .github/workflows/prod-cloudflare.yaml diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml new file mode 100644 index 0000000..592b818 --- /dev/null +++ b/.github/workflows/build-push.yml @@ -0,0 +1,37 @@ +name: Build from push +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.141.0 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + + - name: Build site + uses: omsf/static-site-tools/build/hugo@main + with: + base-url: "" + + - name: Make artifact + shell: bash + run: tar czf site.tar.gz public + + - name: Upload build artifact + if: ${{ github.event_name != 'schedule' }} + uses: actions/upload-artifact@v4 + with: + name: site-build + path: site.tar.gz + if-no-files-found: error + retention-days: 1 diff --git a/.github/workflows/prod-cloudflare.yaml b/.github/workflows/prod-cloudflare.yaml new file mode 100644 index 0000000..3c38a28 --- /dev/null +++ b/.github/workflows/prod-cloudflare.yaml @@ -0,0 +1,21 @@ +name: Deploy to production + +on: + workflow_run: + workflows: ["Build from push"] + types: + - completed + branches: + - main + +jobs: + deploy-to-prod: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: omsf/static-site-tools/.github/workflows/prod-cloudflare.yaml@main + with: + run-id: ${{ github.event.workflow_run.id }} + project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }} + html-dir: _site + secrets: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} From 782f096a137061491f96532a911522e3757fc2fb Mon Sep 17 00:00:00 2001 From: Ethan Holz Date: Wed, 18 Mar 2026 11:19:47 -0600 Subject: [PATCH 2/2] ci: address PR feedback on Cloudflare workflows --- .github/workflows/build-push.yml | 4 ---- .github/workflows/prod-cloudflare.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 592b818..cb452f7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -15,9 +15,6 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: Install Node.js dependencies - run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - - name: Build site uses: omsf/static-site-tools/build/hugo@main with: @@ -28,7 +25,6 @@ jobs: run: tar czf site.tar.gz public - name: Upload build artifact - if: ${{ github.event_name != 'schedule' }} uses: actions/upload-artifact@v4 with: name: site-build diff --git a/.github/workflows/prod-cloudflare.yaml b/.github/workflows/prod-cloudflare.yaml index 3c38a28..d33a7f5 100644 --- a/.github/workflows/prod-cloudflare.yaml +++ b/.github/workflows/prod-cloudflare.yaml @@ -15,7 +15,7 @@ jobs: with: run-id: ${{ github.event.workflow_run.id }} project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }} - html-dir: _site + html-dir: public secrets: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}