-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8af26a
commit 7368860
Showing
81 changed files
with
20,514 additions
and
1 deletion.
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,3 @@ | ||
# Example: | ||
# SERVERVAR="foo" | ||
# NEXT_PUBLIC_CLIENTVAR="bar" |
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,33 @@ | ||
name: Format Code | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format-code: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Install bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Lint | ||
run: | | ||
bun i | ||
bun run lint:fix | ||
- uses: stefanzweifel/git-auto-commit-action@v5 |
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,52 @@ | ||
name: Auto Version Patch | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
auto-version-patch: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Patch version | ||
id: patch_version | ||
run: | | ||
PKG_VER=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | xargs) | ||
major=$(echo $PKG_VER | cut -d. -f1) | ||
minor=$(echo $PKG_VER | cut -d. -f2) | ||
build=$(echo $PKG_VER | cut -d. -f3) | ||
if [ $build -lt 50 ]; then | ||
build=$((build + 1)) | ||
else | ||
build=0 | ||
if [ $minor -lt 50 ]; then | ||
minor=$((minor + 1)) | ||
else | ||
minor=0 | ||
major=$((major + 1)) | ||
fi | ||
fi | ||
NEW_VER="$major.$minor.$build" | ||
npm --no-git-tag-version version $NEW_VER | ||
# We don't need a .lock file other than bun.lockb. | ||
rm -rf package-lock.json yarn.lock pnpm-lock.yaml | ||
echo "package_version=$NEW_VER" >> $GITHUB_OUTPUT | ||
- name: Commit and push changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: 'feat: auto update version ${{ steps.patch_version.outputs.package_version }} ↑' |
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,42 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# database | ||
/prisma/db.sqlite | ||
/prisma/db.sqlite-journal | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
next-env.d.ts | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables | ||
.env | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
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,9 @@ | ||
{ | ||
"singleQuote": true, | ||
"useTabs": false, | ||
"semi": true, | ||
"printWidth": 120, | ||
"jsxSingleQuote": false, | ||
"endOfLine": "auto", | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
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,33 @@ | ||
FROM oven/bun:1 AS base | ||
WORKDIR /app | ||
|
||
FROM base AS deps | ||
COPY package.json bun.lockb ./ | ||
|
||
RUN bun install --frozen-lockfile | ||
RUN bun add -g --arch=x64 --platform=linux sharp | ||
|
||
FROM node:18 as build | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=deps /app/node_modules ./node_modules | ||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM base AS runner | ||
|
||
USER bun | ||
|
||
COPY --from=build /app/package.json ./package.json | ||
COPY --from=build /app/node_modules ./node_modules | ||
COPY --from=build /app/.next ./.next | ||
COPY --from=build /app/public ./public | ||
|
||
ENV NODE_ENV=production | ||
|
||
EXPOSE 20481 | ||
ENV PORT 20481 | ||
|
||
CMD ["bun", "run", "start"] |
Oops, something went wrong.