Skip to content

Commit

Permalink
feat: Move build from Cloudflare to GitHub Action to prevent reaching…
Browse files Browse the repository at this point in the history
… limitations (#30)

* feat: Move build from Cloudflare to GitHub Action to prevent reaching limitations

* fix: Fix missing environment secrets

* fix: Fix typo
  • Loading branch information
4o3F authored Jan 19, 2024
1 parent 6e87215 commit 274aa9e
Show file tree
Hide file tree
Showing 10 changed files with 637 additions and 55 deletions.
30 changes: 15 additions & 15 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore shadcn files
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore shadcn files
src/lib/components/ui
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
run-name: Build & Deploy
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/Iron
- run: npm install -g pnpm
- run: pnpm install
- run: pnpm build
- run: pnpm wrangler pages deploy build --project-name dval-in
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.idea
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.idea
/.npm-only-allow
36 changes: 18 additions & 18 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Get the commit message
commit_msg=$(cat "$1")
original_commit_msg=$(cat "$1")

# Check if the commit message contains the [CI Skip] prefix
if echo "$commit_msg" | grep -q '^\[CI Skip\]'; then
# Remove the [CI Skip] prefix
commit_msg=$(echo "$commit_msg" | sed 's/^\[CI Skip\] //')

# Write the modified commit message back to the file
echo "$commit_msg" > "$1"
fi

pnpm exec commitlint --edit "$1"
echo "$original_commit_msg" > "$1"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Get the commit message
commit_msg=$(cat "$1")
original_commit_msg=$(cat "$1")

# Check if the commit message contains the [CI Skip] prefix
if echo "$commit_msg" | grep -q '^\[CI Skip\]'; then
# Remove the [CI Skip] prefix
commit_msg=$(echo "$commit_msg" | sed 's/^\[CI Skip\] //')

# Write the modified commit message back to the file
echo "$commit_msg" > "$1"
fi

pnpm exec commitlint --edit "$1"
echo "$original_commit_msg" > "$1"
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm format && pnpm lint
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm format && pnpm lint
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
engine-strict=true
8 changes: 4 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "husky install",
"prepare": "pnpm husky install",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
Expand Down Expand Up @@ -37,7 +37,8 @@
"tailwindcss": "^3.4.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3"
"vite": "^5.0.3",
"wrangler": "^3.23.0"
},
"type": "module",
"dependencies": {
Expand Down
Loading

0 comments on commit 274aa9e

Please sign in to comment.