Skip to content

Commit

Permalink
CHORE: Setup CI/CD using Github Actions and Cloudflare CLI (#1)
Browse files Browse the repository at this point in the history
* chore: added github action configuration file

* chore: use cloudflare CLI to build and deploy the app

* chore: removed develop branch from github action

* fix: run development build only when pull request is raised to master

* refactor: removed duplicate build steps in CI pipeline

* chore: removed duplicate checks on CI pipeline
  • Loading branch information
ArjunGTX committed Jan 3, 2025
1 parent 56b7fd6 commit 744c350
Show file tree
Hide file tree
Showing 5 changed files with 5,483 additions and 869 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run checks and deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Run-Checks:
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.9.0
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build artifacts
run: npm run build:ci
- name: Deploy application
uses: cloudflare/pages-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: .vercel/output/static
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# production
/build
/.vercel/output/static

# misc
.DS_Store
Expand Down
Loading

0 comments on commit 744c350

Please sign in to comment.