-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Martinelli-3535/Jungwoo/Detail
Jungwoo/Complete
- Loading branch information
Showing
75 changed files
with
2,751 additions
and
2,754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,74 @@ | ||
name: Docker CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'production' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'production' | ||
push: | ||
branches: | ||
- 'production' | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
branches: | ||
- 'production' | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: Make env | ||
run: | | ||
touch ./.env | ||
echo "${{ secrets.ENV }}" > ./.env | ||
echo .env | ||
shell: sh | ||
- name: Make env | ||
run: | | ||
touch ./.env | ||
echo "${{ secrets.ENV }}" > ./.env | ||
echo .env | ||
shell: sh | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Build Project | ||
run: yarn build | ||
- name: Build Project | ||
run: yarn build | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ secrets.DOCKER_USERNAME }}/home-appcenter | ||
tags: | | ||
type=ref,event=branch | ||
type=semver,pattern={{version}} | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ secrets.DOCKER_USERNAME }}/home-appcenter | ||
tags: | | ||
type=ref,event=branch | ||
type=semver,pattern={{version}} | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
|
||
- name: Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
docker stop inu-hompage | ||
docker rm inu-hompage | ||
docker pull ${{ secrets.DOCKER_USERNAME }}/home-appcenter:production | ||
docker run -d —name inu-hompage -p 3000:3000 ${{ secrets.DOCKER_USERNAME }}/home-appcenter:production | ||
- name: Deploy | ||
uses: appleboy/ssh-action@v0.1.7 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
docker stop inu-hompage | ||
docker rm inu-hompage | ||
docker pull ${{ secrets.DOCKER_USERNAME }}/home-appcenter:production | ||
docker run -d --name inu-hompage -p 3000:3000 ${{ secrets.DOCKER_USERNAME }}/home-appcenter:production | ||
# docker image prune -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ | |
# production | ||
/build | ||
|
||
# git | ||
appcenter-homepage-renewal.git/ | ||
|
||
# misc | ||
.DS_Store | ||
.env | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
appcenter-homepage-renewal.git/hooks/applypatch-msg.sample
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
174 changes: 0 additions & 174 deletions
174
appcenter-homepage-renewal.git/hooks/fsmonitor-watchman.sample
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
appcenter-homepage-renewal.git/hooks/pre-applypatch.sample
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.