diff --git a/.eslintrc.json b/.eslintrc.json index a7585b5..5612b29 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,7 +19,7 @@ "plugins": ["@typescript-eslint", "prettier"], "overrides": [ { - "files": ["*.ts", "*.tsx"], // Your TypeScript files extension + "files": ["*.ts", "*.tsx", "*.spec.ts"], // Your TypeScript files extension // As mentioned in the comments, you should extend TypeScript plugins here, // instead of extending them outside the `overrides`. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23a23b5..bffe945 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: pull_request jobs: build: @@ -11,4 +11,4 @@ jobs: cmd: install # will run `yarn install` command - uses: borales/actions-yarn@v3.0.0 with: - cmd: build # will run `yarn build` command \ No newline at end of file + cmd: build # will run `yarn build` command diff --git a/.github/workflows/deploy-development.yml b/.github/workflows/deploy-development.yml index e0fa593..c51dde2 100644 --- a/.github/workflows/deploy-development.yml +++ b/.github/workflows/deploy-development.yml @@ -2,12 +2,17 @@ name: build and push code on: push: branches: - - develop + - development + - sprint/** jobs: git-push: name: build and push runs-on: ubuntu-latest steps: + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch - uses: actions/checkout@v2 - uses: borales/actions-yarn@v3.0.0 with: @@ -15,6 +20,9 @@ jobs: - uses: borales/actions-yarn@v3.0.0 with: cmd: build # will run `yarn build` command + - name: ls /dist + shell: bash + run: ls dist - uses: cpina/github-action-push-to-another-repository@main env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} @@ -23,11 +31,5 @@ jobs: destination-github-username: 'TeamPiickle' destination-repository-name: 'express-build' user-email: dev.kayoung@gmail.com - target-branch: develop -# deploy: -# name: deploy pm2 -# needs: git-push -# runs-on: [self-hosted, development] -# steps: -# - name: run shell script -# run: /home/ubuntu/deploy-piickle-server.sh + target-branch: ${{ steps.extract_branch.outputs.branch }} + create-target-branch-if-needed: true diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index d5dc375..de41551 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -1,11 +1,11 @@ -name: build and push code +name: CI on: push: branches: - main jobs: git-push: - name: build and push + name: Build and push runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -24,10 +24,21 @@ jobs: destination-repository-name: 'express-build' user-email: dev.kayoung@gmail.com target-branch: main -# deploy: -# name: deploy pm2 -# needs: git-push -# runs-on: [self-hosted, production] -# steps: -# - name: run shell script -# run: /home/ubuntu/deploy-piickle-server.sh + sync-branches: + name: Sync main -> develop + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Node + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Opening pull request + id: pull + uses: tretuna/sync-branches@1.4.0 + with: + GITHUB_TOKEN: ${{ secrets.TOKEN_FOR_PR }} + FROM_BRANCH: "main" + TO_BRANCH: "develop" + PULL_REQUEST_TITLE: "sync: main -> develop" diff --git a/README.md b/README.md index 3aa7bcd..28ad4c8 100644 --- a/README.md +++ b/README.md @@ -1,253 +1,3 @@ -# Project + - - - -> 지금 내게 필요한 대화주제 추천 서비스, Piickle - -