From 1b007ea9bb767ef711ea669165d53fa206e7989c Mon Sep 17 00:00:00 2001 From: devwqc Date: Fri, 8 Nov 2024 10:36:10 +0900 Subject: [PATCH 1/4] =?UTF-8?q?chore:=20GitHub=20Actions=20build-test.yml?= =?UTF-8?q?=20main=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20PR=EC=9D=80=20develop?= =?UTF-8?q?=20=EB=B8=8C=EB=9E=9C=EC=B9=98=EB=A7=8C=20=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b2a85f1..2ab063f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -9,6 +9,12 @@ jobs: build-test: runs-on: ubuntu-latest steps: + - name: Check source branch for main PR + if: github.base_ref == 'main' && github.head_ref != 'develop' + run: | + echo "PRs to main branch are only allowed from develop branch" + exit 1 + - name: Checkout your repository using git uses: actions/checkout@v4 - name: Install, build, and upload your site From 27b0175fc93210e2d5475abc0a0550b10a5dcb56 Mon Sep 17 00:00:00 2001 From: devwqc Date: Fri, 8 Nov 2024 10:38:25 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20GitHub=20Actions=20build-test.yml=20?= =?UTF-8?q?=EC=A4=84=EB=B0=94=EA=BF=88=EC=9C=BC=EB=A1=9C=20=EB=B0=9C?= =?UTF-8?q?=EC=83=9D=ED=95=98=EB=8A=94=20=EC=97=90=EB=9F=AC=20=EB=A7=9E?= =?UTF-8?q?=EC=B6=94=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 2ab063f..42f048f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Check source branch for main PR - if: github.base_ref == 'main' && github.head_ref != 'develop' - run: | - echo "PRs to main branch are only allowed from develop branch" - exit 1 + if: github.base_ref == 'main' && github.head_ref != 'develop' + run: | + echo "PRs to main branch are only allowed from develop branch" + exit 1 - name: Checkout your repository using git uses: actions/checkout@v4 From fe6d43f1dfe108a1de1c6593f9903744257c7a78 Mon Sep 17 00:00:00 2001 From: devwqc Date: Fri, 8 Nov 2024 10:44:44 +0900 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20GitHub=20Actions=20build-test.yml?= =?UTF-8?q?=20PR=20types=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 42f048f..1daa4d6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -3,6 +3,7 @@ name: Build Test on: pull_request: branches: [main, develop] + types: [opened, synchronize, reopened, edited] workflow_dispatch: jobs: From c2e9a28a6de0e45ac96cae253232e53ef78801ff Mon Sep 17 00:00:00 2001 From: devwqc Date: Fri, 8 Nov 2024 11:22:28 +0900 Subject: [PATCH 4/4] =?UTF-8?q?refactor:=20Home=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80,=20Blog=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=86=B5?= =?UTF-8?q?=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/menu.ts | 4 ---- src/pages/index.astro | 38 ++------------------------------------ 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/src/constants/menu.ts b/src/constants/menu.ts index 5956c1a..33a6ffa 100644 --- a/src/constants/menu.ts +++ b/src/constants/menu.ts @@ -1,8 +1,4 @@ export const menu = [ - { - path: '/', - label: 'Home', - }, { path: '/blog', label: 'Blog', diff --git a/src/pages/index.astro b/src/pages/index.astro index 9d08d11..aea2841 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,41 +1,7 @@ --- -import FormattedDate from '@/components/FormattedDate.astro'; import PageLayout from '@/layouts/PageLayout.astro'; -import { getCollection } from 'astro:content'; -const posts = (await getCollection('blog')).sort( - (a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf() -); +return Astro.redirect('/blog'); --- - - - +