From d36523800c6f126ade8c2c5c65538319e7f3f2cf Mon Sep 17 00:00:00 2001 From: Matt Leon <108271225+wydengyre@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:53:46 +0700 Subject: [PATCH] ci: automate deployment (#5) Deploy on push to main --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 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 0000000..09fcaa6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + deploy: + timeout-minutes: 2 + runs-on: ubuntu-22.04 + name: Deploy + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 + with: + node-version-file: '.node-version' + cache: 'npm' + - name: Install npm dependencies + run: npm ci + - name: Build podcast lib + run: npm run build-podcast + - name: Deploy + uses: cloudflare/wrangler-action@7c01cc48d88a1f83b4716e0557c168854a9dcdb8 # v3.4.1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}