Skip to content

Commit

Permalink
Merge pull request keploy#59 from keploy/build-pipeline
Browse files Browse the repository at this point in the history
feat: build pipeline
  • Loading branch information
Sonichigo authored Oct 17, 2024
2 parents 4c75c7a + a0801ef commit 99d8a1e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Deploy Blog Website

on:
push:
branches:
- main # Triggers on push to 'main'
pull_request:
branches:
- main # Triggers on PRs to 'main'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Build Next.js application
env:
WORDPRESS_API_URL: "https://wp.keploy.io/graphql"
run: npm run build
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ module.exports = {
},
],
},
}
}
3 changes: 2 additions & 1 deletion pages/technology/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const postBody = ({ content, post }) => {

export default function Post({ post, posts, reviewAuthorDetails, preview }) {
const router = useRouter();
const { slug } = router.query;
const morePosts = posts?.edges;
const time = 10 + calculateReadingTime(post?.content || "");
const [avatarImgSrc, setAvatarImgSrc] = useState("");
Expand Down Expand Up @@ -102,7 +103,6 @@ export default function Post({ post, posts, reviewAuthorDetails, preview }) {
const avatarDivMatch = content.match(
/<div[^>]*class="pp-author-boxes-avatar"[^>]*>\s*<img[^>]*src='([^']*)'[^>]*\/?>/
);
console.log(avatarDivMatch[1]);
if (avatarDivMatch && avatarDivMatch[1]) {
setAvatarImgSrc(avatarDivMatch[1]);
} else {
Expand Down Expand Up @@ -171,6 +171,7 @@ export default function Post({ post, posts, reviewAuthorDetails, preview }) {
post?.content && postBody({ content: post?.content, post })
}
authorName={post?.ppmaAuthorName || ""}
slug={slug}
ReviewAuthorDetails={
reviewAuthorDetails &&
reviewAuthorDetails?.length > 0 &&
Expand Down

0 comments on commit 99d8a1e

Please sign in to comment.