From d4ace88a7ea7e96b7a8f651f8cd7f55637d8077f Mon Sep 17 00:00:00 2001 From: Gillian Minnehan <41022382+gminn@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:26:04 -0500 Subject: [PATCH] feat: add deploy workflow (#543) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Summary Currently, we only deploy the site on pushes to `master`. This works fine expect in the cases where we might was to schedule a post with a future publish date. This is scheduled for 10am ET every weekday. ### Test Plan - Manually triggered the workflow with `gh workflow run deploy.yml --ref gminn/add-daily-deployment`, confirmed it ran successfully ([result](https://github.com/memfault/interrupt/actions/runs/12739793493)) - Confirmed site was deployed properly 🎉 ![CleanShot 2025-01-12 at 21 58 41@2x](https://github.com/user-attachments/assets/9b045500-0853-4bf1-9a18-5404ac1a5d98) --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..511bcbbba --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Site Deployment + +on: + schedule: + # At 2:00pm UTC (10:00am ET) on Monday through Friday + # https://cron.help/#0_14_*_*_1-5 + - cron: "0 14 * * 1-5" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + run_name: + description: "Name of the run, used to distinguish it from others" + required: false + type: string + default: "" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Deploy hook request + run: curl -X POST ${{ secrets.CLOUDFLARE_DEPLOY_HOOK }}