diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..1b90006 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Build and deploy + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Prepare environment + uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Install deps + run: npm install + + - name: Build plugin(s) and site + run: npm run build + + - name: Install API deps + working-directory: api + run: npm install + + - name: Deploy to Cloudflare Workers + working-directory: api + env: + CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} + CLOUDFLARE_EMAIL: ${{ secrets.CLOUDFLARE_EMAIL }} + run: npx wrangler deploy