-
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.
* refactor to ssr * update ci/cd * add flyio hosting * replace orderBy with toSorted * adjust models * more on 200 post * finish changelog * more on 200 post
- Loading branch information
Showing
282 changed files
with
11,312 additions
and
15,734 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 @@ | ||
BLOG_PORT=3000 |
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,16 @@ | ||
upstream blog { | ||
server blog:${BLOG_PORT}; | ||
} | ||
|
||
server { | ||
listen 80; | ||
listen [::]:80; | ||
|
||
location / { | ||
proxy_pass http://blog; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |
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,20 @@ | ||
**/.idea | ||
**/node_modules | ||
**/dist | ||
**/.env | ||
|
||
**/test-results/ | ||
**/playwright-report/ | ||
**/blob-report/ | ||
**/playwright/.cache/ | ||
|
||
packages/blog/public/client/style.css | ||
packages/blog/public/client/main.js | ||
|
||
**/.DS_Store | ||
|
||
.docker/* | ||
!.docker/proxy | ||
.docker/proxy/* | ||
!.docker/proxy/example.env | ||
!.docker/proxy/templates |
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 |
---|---|---|
@@ -1,62 +1,47 @@ | ||
name: CI/CD | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
BASE_URL: ${{ vars.BASE_URL }} | ||
|
||
on: push | ||
|
||
jobs: | ||
test: | ||
format-build-test-and-e2e: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
cache: 'npm' | ||
|
||
- run: npm ci --ignore-scripts --no-audit | ||
|
||
- run: npm run format:check | ||
|
||
- run: yarn | ||
- run: npm run build:client --workspace=@digital-garden/blog | ||
|
||
- run: yarn test | ||
- run: npm run build:server --workspace=@digital-garden/blog | ||
|
||
- run: yarn workspace @digital-garden/blog run e2e:setup --with-deps | ||
- run: npm run test --workspace=@digital-garden/blog | ||
|
||
- run: yarn workspace @digital-garden/blog run e2e | ||
- run: npm run e2e:setup --workspace=@digital-garden/blog -- --with-deps | ||
|
||
- run: npm run e2e --workspace=@digital-garden/blog | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: playwright-report | ||
path: ./packages/blog/playwright-report/ | ||
retention-days: 30 | ||
|
||
- run: yarn build | ||
if: github.ref != 'refs/heads/master' | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
if: github.ref == 'refs/heads/master' | ||
concurrency: deploy-group | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'yarn' | ||
|
||
- run: yarn | ||
|
||
- run: yarn workspace @digital-garden/blog run vercel:pull --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- run: yarn workspace @digital-garden/blog run vercel:build --token=${{ secrets.VERCEL_TOKEN }} | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- run: yarn workspace @digital-garden/blog run vercel:deploy --token=${{ secrets.VERCEL_TOKEN }} | ||
- run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_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 |
---|---|---|
@@ -1,26 +1,20 @@ | ||
**/.idea | ||
**/node_modules | ||
**/dist | ||
# despite the fact that this codegen dir should be git ignored, it still needs to be indexed by IDEA | ||
# to property inherit types of built-in Astro Collection helpers | ||
**/.astro | ||
**/.vercel | ||
**/.env | ||
|
||
**/test-results/ | ||
**/playwright-report/ | ||
**/blob-report/ | ||
**/playwright/.cache/ | ||
|
||
packages/blog/src/content/.obsidian | ||
packages/blog/src/content/templates | ||
|
||
# Yarn | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
packages/blog/public/client/style.css | ||
packages/blog/public/client/main.js | ||
|
||
**/.DS_Store | ||
|
||
.docker/* | ||
!.docker/proxy | ||
.docker/proxy/* | ||
!.docker/proxy/example.env | ||
!.docker/proxy/templates |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn format:check | ||
npm run format:check |
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,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run build:server --workspace=@digital-garden/blog | ||
npm run test --workspace=@digital-garden/blog |
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 @@ | ||
20.12.2 |
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
**/.idea | ||
**/node_modules | ||
**/dist | ||
# despite the fact that this codegen dir should be git ignored, it still needs to be indexed by IDEA | ||
# to property inherit types of built-in Astro Collection helpers | ||
**/.astro | ||
**/.vercel | ||
**/.env | ||
|
||
**/test-results/ | ||
**/playwright-report/ | ||
**/blob-report/ | ||
**/playwright/.cache/ | ||
|
||
packages/blog/src/content/.obsidian | ||
packages/blog/public/client/style.css | ||
packages/blog/public/client/main.js | ||
|
||
# Yarn | ||
.pnp.* | ||
.yarn/* | ||
**/.DS_Store | ||
|
||
**/.DS_Store= | ||
.docker/* | ||
!.docker/proxy | ||
.docker/proxy/* | ||
!.docker/proxy/example.env | ||
!.docker/proxy/templates |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
services: | ||
proxy: | ||
image: nginx:1.25-alpine | ||
container_name: proxy | ||
hostname: proxy | ||
restart: unless-stopped | ||
env_file: ./.docker/proxy/.env | ||
ports: | ||
- '80:80' | ||
volumes: | ||
- './.docker/proxy/templates:/etc/nginx/templates' | ||
depends_on: | ||
- blog | ||
|
||
blog: | ||
build: | ||
dockerfile: ./packages/blog/Dockerfile | ||
container_name: blog | ||
hostname: blog | ||
restart: unless-stopped | ||
env_file: ./packages/blog/.env |
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,22 @@ | ||
app = 'digital-garden-blog' | ||
primary_region = 'waw' | ||
|
||
[build] | ||
dockerfile = "./packages/blog/Dockerfile" | ||
|
||
[env] | ||
NODE_ENV = "production" | ||
PORT = 3000 | ||
BASE_URL = "https://www.vorant94.io" | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = false | ||
auto_start_machines = false | ||
processes = ['app'] | ||
|
||
[[vm]] | ||
memory = '1gb' | ||
cpu_kind = 'shared' | ||
cpus = 1 |
Oops, something went wrong.