Skip to content

Commit

Permalink
fix: adding ci
Browse files Browse the repository at this point in the history
rachelslurs committed Dec 1, 2024
1 parent 4df570d commit 45c24a3
Showing 7 changed files with 76 additions and 19 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
workflow_call:

jobs:
build:
name: Code standards & build
runs-on: ubuntu-latest
timeout-minutes: 3

strategy:
matrix:
node-version: [18.x]

steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v4

- name: "🔧 Setup Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: "📦 Install dependencies"
run: npm ci

- name: "🔎 Lint code"
run: npm run lint

- name: "📝 Checking code format"
run: npm run format:check
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Base stage for building the static files
FROM node:lts AS base
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# Runtime stage for serving the application
FROM nginx:mainline-alpine-slim AS runtime
COPY --from=base ./app/dist /usr/share/nginx/html
EXPOSE 80
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ version: '3'

services:
app:
image: node:18
image: node:20
ports:
- 4321:4321
working_dir: /app
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Website",
"version": "4.2.0",
"name": "rachel.fyi",
"version": "1.0.0",
"private": false,
"scripts": {
"dev": "tinacms dev -c \"astro dev\"",
4 changes: 3 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -3,10 +3,12 @@ import type { Site, SocialObjects } from "./types";
export const SITE: Site = {
website: "https://rachel.fyi", // replace this with your deployed domain
author: "Rachel Cantor",
desc: "A senior engineer with a background spanning the full stack of web development; passionate about delivering exceptional UI/UX.",
profile: "https://rachel.fyi",
desc: "An engineer with a background spanning the full stack of web development; passionate about delivering exceptional UI/UX.",
title: "Rachel Cantor",
ogImage: "og_image.png",
lightAndDarkMode: true,
postPerIndex: 4,
postPerPage: 3,
scheduledPostMargin: 15 * 60 * 1000, // 15 minutes
showArchives: true,
37 changes: 22 additions & 15 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ import Card from "@components/Card";
import WorkCard from "@components/WorkCard";
import getSortedPosts from "@utils/getSortedPosts";
import getSortedWork from "@utils/getSortedWork";
import { SITE } from "@config";
const posts = await getCollection("blog");
@@ -44,13 +45,16 @@ const featuredWorks = sortedWorks.filter(({ data }) => data.featured);
<section id="featured-posts">
<h2>Featured Posts</h2>
<ul>
{featuredPosts.map(({ data, slug }) => (
<Card
href={`/posts/${slug}/`}
frontmatter={data}
secHeading={false}
/>
))}
{featuredPosts.map(
({ data, slug }, index) =>
index < SITE.postPerIndex && (
<Card
href={`/posts/${slug}/`}
frontmatter={data}
secHeading={false}
/>
)
)}
</ul>
</section>
</>
@@ -63,13 +67,16 @@ const featuredWorks = sortedWorks.filter(({ data }) => data.featured);
<section id="featured-work">
<h2>Featured Work</h2>
<ul>
{featuredWorks.map(({ data, slug }) => (
<WorkCard
href={`/work/${slug}/`}
frontmatter={data}
secHeading={false}
/>
))}
{featuredWorks.map(
({ data, slug }, index) =>
index < SITE.postPerIndex && (
<WorkCard
href={`/work/${slug}/`}
frontmatter={data}
secHeading={false}
/>
)
)}
</ul>
</section>
</>
@@ -86,7 +93,7 @@ const featuredWorks = sortedWorks.filter(({ data }) => data.featured);
@apply pb-6 pt-8;
}
#hero h4 {
@apply text-2xl font-bold mb-6;
@apply mb-6 text-2xl font-bold;
}
#hero .rss-link {
@apply mb-6;
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -3,10 +3,12 @@ import type socialIcons from "@assets/socialIcons";
export type Site = {
website: string;
author: string;
profile: string;
desc: string;
title: string;
ogImage?: string;
lightAndDarkMode: boolean;
postPerIndex: number;
postPerPage: number;
scheduledPostMargin: number;
showArchives?: boolean;

0 comments on commit 45c24a3

Please sign in to comment.