Skip to content

Commit ea3cf80

Browse files
authored
Merge pull request #59 from devwqc/develop
[release] develop to main
2 parents ca6b2a2 + b3a155d commit ea3cf80

File tree

3 files changed

+9
-40
lines changed

3 files changed

+9
-40
lines changed

.github/workflows/build-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ name: Build Test
33
on:
44
pull_request:
55
branches: [main, develop]
6+
types: [opened, synchronize, reopened, edited]
67
workflow_dispatch:
78

89
jobs:
910
build-test:
1011
runs-on: ubuntu-latest
1112
steps:
13+
- name: Check source branch for main PR
14+
if: github.base_ref == 'main' && github.head_ref != 'develop'
15+
run: |
16+
echo "PRs to main branch are only allowed from develop branch"
17+
exit 1
18+
1219
- name: Checkout your repository using git
1320
uses: actions/checkout@v4
1421
- name: Install, build, and upload your site

src/constants/menu.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
export const menu = [
2-
{
3-
path: '/',
4-
label: 'Home',
5-
},
62
{
73
path: '/blog',
84
label: 'Blog',

src/pages/index.astro

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
11
---
2-
import FormattedDate from '@/components/FormattedDate.astro';
32
import PageLayout from '@/layouts/PageLayout.astro';
4-
import { getCollection } from 'astro:content';
53
6-
const posts = (await getCollection('blog')).sort(
7-
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()
8-
);
4+
return Astro.redirect('/blog');
95
---
106

11-
<PageLayout title="Home">
12-
<ul>
13-
{
14-
posts.map((post) => (
15-
<li class="py-5">
16-
<article>
17-
<a
18-
href={`/blog/${post.slug}/`}
19-
class="hover:text-emerald-600 flex flex-col gap-1"
20-
>
21-
<h2 class="text-3xl font-bold">{post.data.title}</h2>
22-
<p class="text-gray-500 text-sm">
23-
<span>
24-
작성일:
25-
<FormattedDate datetime={post.data.pubDate} />
26-
</span>
27-
{post.data.updatedDate && (
28-
<span>
29-
수정일:
30-
<FormattedDate datetime={post.data.updatedDate} />
31-
</span>
32-
)}
33-
</p>
34-
<p class="text-slate-500">{post.data.description}</p>
35-
</a>
36-
</article>
37-
</li>
38-
))
39-
}
40-
</ul>
41-
</PageLayout>
7+
<PageLayout title="Home" />

0 commit comments

Comments
 (0)