diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b2a85f1..1daa4d6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -3,12 +3,19 @@ name: Build Test on: pull_request: branches: [main, develop] + types: [opened, synchronize, reopened, edited] workflow_dispatch: 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 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'); --- - - - +