Skip to content

Commit

Permalink
cloudflare deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Apr 16, 2024
1 parent 18631e9 commit 0e6c5d2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/pages-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test
run: npm test
- name: Build
run: npm install && npm run ci
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: YOUR_PROJECT_NAME # e.g. 'my-project'
# directory: YOUR_DIRECTORY_OF_STATIC_ASSETS # e.g. 'dist'
directory: dist/cloudflare
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"ng": "ng",
"start": "npm run build && wrangler pages dev dist/cloudflare --compatibility-date=2024-04-05 --experimental-local",
"ci": "ng build",
"build": "ng build && npm run process",
"watch": "ng build --watch --configuration development",
"test": "ng test",
Expand Down Expand Up @@ -44,4 +45,4 @@
"typescript": "~5.3.2",
"wrangler": "^0.0.0-9a46e03f"
}
}
}

0 comments on commit 0e6c5d2

Please sign in to comment.