깃 액션 ci 스택 마이그레이션 테스트
This commit is contained in:
46
.github/workflows/cicd-branch-main.yml
vendored
Normal file
46
.github/workflows/cicd-branch-main.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: cicd branch main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout src
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod 777 gradlew
|
||||
shell: bash
|
||||
|
||||
- name: Clean build test with Gradle # clean build test
|
||||
run: ./gradlew clean build test
|
||||
shell: bash
|
||||
|
||||
- name: Make zip file # zip 파일 생성
|
||||
run: zip -r ./springboot-blog.zip .
|
||||
shell: bash
|
||||
|
||||
- name: Configure AWS credentials # AWS 자격 증명
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
|
||||
aws-region: ${{ secrets.AWS_REGION }}
|
||||
|
||||
- name: Upload to S3 # S3 업로드
|
||||
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./springboot-blog.zip s3://${{ secrets.AWS_S3_BUCKET }}/CI/springboot-blog.zip
|
||||
|
||||
- name: Code Deploy # CodeDeploy에 배포 요청
|
||||
run: aws deploy create-deployment --application-name ${{ secrets.AWS_CODEDEPLOY_NAME }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ secrets.AWS_CODEDEPLOY_GROUP }} --s3-location bucket=${{ secrets.AWS_S3_BUCKET }},bundleType=zip,key=CI/springboot-blog.zip
|
||||
@@ -130,8 +130,8 @@ public class ArticleController {
|
||||
@RequestParam String tagName,
|
||||
Model model) {
|
||||
Page<ArticleResponseForCardBox> articleList = articleQueriesUseCase.getArticlesByTag(tagName, page);
|
||||
for(ArticleResponseForCardBox article : articleList){
|
||||
article.setContent(Jsoup.parse(getHtmlRenderer().render(getParser().parse(article.getContent()))).text());
|
||||
for(var article : articleList){
|
||||
article.parseAndRenderForView();
|
||||
}
|
||||
var pagingBoxHandler = PagingBoxHandler.createOf(page, (int)articleList.getTotalElements());
|
||||
layoutRenderingUseCase.AddLayoutTo(model);
|
||||
@@ -147,8 +147,8 @@ public class ArticleController {
|
||||
@RequestParam String keyword,
|
||||
Model model) {
|
||||
Page<ArticleResponseForCardBox> articleList = articleQueriesUseCase.getArticlesByKeyword(keyword, page);
|
||||
for(ArticleResponseForCardBox article : articleList){
|
||||
article.setContent(Jsoup.parse(getHtmlRenderer().render(getParser().parse(article.getContent()))).text());
|
||||
for(var article : articleList){
|
||||
article.parseAndRenderForView();
|
||||
}
|
||||
var pagingBoxHandler = PagingBoxHandler.createOf(page, (int)articleList.getTotalElements());
|
||||
layoutRenderingUseCase.AddLayoutTo(model);
|
||||
|
||||
@@ -2,9 +2,13 @@ package myblog.blog.article.application.port.incomming.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.jsoup.Jsoup;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static myblog.blog.shared.utils.MarkdownUtils.getHtmlRenderer;
|
||||
import static myblog.blog.shared.utils.MarkdownUtils.getParser;
|
||||
|
||||
/*
|
||||
- 메인 화면 렌더링용 아티클 DTO
|
||||
*/
|
||||
@@ -17,6 +21,8 @@ public class ArticleResponseForCardBox {
|
||||
private String thumbnailUrl;
|
||||
private LocalDateTime createdDate;
|
||||
|
||||
|
||||
public void parseAndRenderForView(){
|
||||
this.content = Jsoup.parse(getHtmlRenderer().render(getParser().parse(this.content))).text();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package myblog.blog.infra;
|
||||
package myblog.blog.infra.exception;
|
||||
|
||||
import myblog.blog.shared.application.port.incomming.LayoutRenderingUseCase;
|
||||
|
||||
Reference in New Issue
Block a user