mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-05 16:56:22 +00:00
⚡️ feat: add post fetching by ID and improve blog home page
- Implemented `getPostById` API function to fetch a post by its ID. - Refactored the main page to use a new `BlogHome` component for better organization. - Added loading state and sorting functionality for posts on the blog home page. - Integrated label fetching and display on the blog home page. - Enhanced the blog card component with improved layout and statistics display. - Updated the navbar to use dynamic configuration values. - Added Docker support with a comprehensive build and push workflow. - Created a custom hook `useStoredState` for managing local storage state. - Added a new page for displaying individual posts with metadata generation. - Removed unused components and files to streamline the codebase.
This commit is contained in:
38
.github/workflows/build.yaml
vendored
Normal file
38
.github/workflows/build.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Build and Push Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push frontend image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./web
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/neo-blog-frontend:latest
|
||||
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/neo-blog-backend:latest
|
Reference in New Issue
Block a user