Skip to content

Commit

Permalink
Add GitHub Actions deployment to Cloudflare Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Sep 14, 2024
1 parent 6c97d6c commit ec05246
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Deploy
on:
- push
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
npm ci
- name: Deploy
env:
BRANCH: ${{ github.REF_NAME }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
make deploy
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
BRANCH ?= staging

check:
npx prettier --check functions/

deploy:
npx wrangler pages deploy --branch $(BRANCH) --project-name myhro-info .

lint:
DEBUG=eslint:cli-engine npx eslint --ext .js --ext .ts functions/

Expand Down

0 comments on commit ec05246

Please sign in to comment.