From e045ff4deaec56dcc631d918425b1fe11911fb45 Mon Sep 17 00:00:00 2001 From: Luis Arias Date: Mon, 25 Mar 2024 17:03:22 +0100 Subject: [PATCH] Add deployment flow for site observable --- .github/workflows/deploy.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..f250043 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,28 @@ +name: Deploy + +on: + # Run this workflow whenever a new commit is pushed to main. + push: { branches: [main] } + # Run this workflow once per day, at 10:15 UTC + schedule: [{ cron: "15 10 * * *" }] + # Run this workflow when triggered manually in GitHub’s UI. + workflow_dispatch: {} + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - run: cd site-observable + - run: yarn install --frozen-lockfile + - run: yarn build + - name: Deploy to Observable Cloud + # This parameter to `--message` will use the latest commit message + run: yarn deploy -- --message "$(git log -1 --pretty=%s)" + env: + # Authentication information. See below for how to set this up. + OBSERVABLE_TOKEN: ${{ secrets.OBSERVABLE_TOKEN }}