Skip to content

Commit

Permalink
Fix CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
ravielze committed Aug 1, 2022
1 parent e009ccb commit dc9a926
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: blog-ci

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]

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

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn ci
- run: yarn build --mode production
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn ci
- run: yarn build --mode production
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"preinstall": "npx only-allow yarn",
"dev": "vite",
"build": "yarn lint && tsc && vite build",
"build": "tsc && vite build",
"preview": "vite preview",
"prepare": "husky install",
"lint": "yarn eslint --fix && yarn prettier --write .",
Expand Down
3 changes: 1 addition & 2 deletions src/pages/Detailpage/Detailpage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { fetchSinglePost } from '@/service/ghostAPI';
import { renderHTMLContent } from '@/util/renderHTMLContent';
import { MONTHS } from '@/types/constant';
import BaseLayout from '@/layout/BaseLayout';
import { DetailPost } from '@/types/types';
import { DetailpageProps } from '../../types/interface';
import { DetailPost, DetailpageProps } from '../../types/interface';
import useFetch from '../../hooks/useFetch';
import Loading from '../Loading';
import PageNotFound from '../PageNotFound';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Detailpage/Render.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable jsx-a11y/media-has-caption */
import { NodeExtended } from '@/types/types';
import { NodeExtended } from '@/types/interface';
import { formatUrl } from '@/util/util';
import { Flex, VStack, Text, Link, Center, Button } from '@chakra-ui/react';
import { Tweet } from 'react-twitter-widgets';
Expand Down
2 changes: 1 addition & 1 deletion src/util/renderHTMLContent.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Render from '@/pages/Detailpage/Render';
import { parse } from 'node-html-parser';
import { NodeExtended } from '@/types/types';
import { NodeExtended } from '@/types/interface';

export const renderHTMLContent = (post: any) => {
const root = parse(post.html.replace(/(\r\n|\n|\r)/gm, ''));
Expand Down

0 comments on commit dc9a926

Please sign in to comment.