-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHORE: Setup CI/CD using Github Actions and Cloudflare CLI (#1)
* 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
Showing
5 changed files
with
5,483 additions
and
869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
# production | ||
/build | ||
/.vercel/output/static | ||
|
||
# misc | ||
.DS_Store | ||
|
Oops, something went wrong.