Skip to content

Commit

Permalink
fix(cd): deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 2, 2024
1 parent 37254d0 commit ee5e8a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/cloudflare-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
Expand All @@ -28,21 +28,7 @@ jobs:
- name: Wrangler Install
run: bun add wrangler

- name: Publish to Cloudflare
- name: Deploy to Cloudflare
run: bun deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
REPOSITORY: ${{ github.repository }}
PRODUCTION_BRANCH: "main"
OUTPUT_DIRECTORY: "dist"
run: |
IFS='/' read -ra fields <<< "$REPOSITORY"
projectName="${fields[1]}"
echo $projectName
bun wrangler pages project list > project_list.txt
if grep -q $projectName project_list.txt; then
echo "Project found"
else
echo "Project not found"
bun wrangler pages project create "$projectName" --production-branch "$PRODUCTION_BRANCH"
fi
bun wrangler pages publish "$OUTPUT_DIRECTORY" --project-name "$projectName"
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ubiquity/action-conventional-commits@master

0 comments on commit ee5e8a5

Please sign in to comment.