-
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.
* feat: deploy.yaml ์ถ๊ฐ * fix: SunEditor ๊ด๋ จ ๋น๋ ์ค๋ฅ ์์ * fix: add missing use client * test: ์๋ ๋ฐฐํฌ * feat: deploy.yaml์ ssh-action ์ ์ฉ * test: ์๋ ๋ฐฐํฌ * deploy: ๋ฐฐํฌ ๋ธ๋์น main์ผ๋ก ๋ณ๊ฒฝ
- Loading branch information
Showing
7 changed files
with
156 additions
and
44 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 |
---|---|---|
|
@@ -10,15 +10,38 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: SSH Remote Commands | ||
uses: appleboy/[email protected] | ||
- name: Setup Node.js environment | ||
uses: actions/[email protected] | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{github.actor}} | ||
password: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Create .env file | ||
run: | | ||
echo "NEXT_PUBLIC_KAKAO_MAP_API_KEY=${{secrets.KAKAO_MAP_API_KEY}}" > .env.local | ||
- name: Build and push Docker images | ||
uses: docker/[email protected] | ||
with: | ||
context: '.' | ||
push: true | ||
tags: | | ||
ghcr.io/wafflestudio/csereal_nextjs_image:latest | ||
ghcr.io/wafflestudio/csereal_nextjs_image:${{github.sha}} | ||
- name: executing remote ssh commands using password | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{secrets.SSH_HOST}} | ||
username: ${{secrets.SSH_USER}} | ||
key: ${{secrets.SSH_KEY}} | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USER }} | ||
key: ${{ secrets.SSH_KEY }} | ||
script: | | ||
cd ~/csereal-web | ||
git pull | ||
npm i | ||
npm run build | ||
pm2 restart csereal_front | ||
docker stop csereal_nextjs_image | ||
docker rm csereal_nextjs_image | ||
docker pull ghcr.io/wafflestudio/csereal_nextjs_image:latest | ||
docker run -d -p 3000:3000 --name csereal_nextjs_image ghcr.io/wafflestudio/csereal_nextjs_image |
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
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
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
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
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
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