diff --git a/.github/workflows/deploy-single-server.yml b/.github/workflows/deploy-single-server.yml new file mode 100644 index 0000000..4506725 --- /dev/null +++ b/.github/workflows/deploy-single-server.yml @@ -0,0 +1,53 @@ +name: Deploy to Single Server + +on: + push: + branches: + - 'main' + workflow_dispatch: + +env: + IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/cicd-practice + IMAGE_TAG: latest + CONTAINER_NAME: ${{ secrets.DOCKERHUB_USERNAME }}-cicd + PORT: 40003 + +jobs: + cicd: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build Container Image + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + + - + name: SSH Remote Commands + uses: appleboy/ssh-action@v1.0.3 + with: + host: server.geunsam2.xyz + username: cicduser + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + timeout: 40s + script: | + docker pull ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + docker rm -f ${{ env.CONTAINER_NAME }} + docker run -d -p ${{ env.PORT }}:3000 --name ${{ env.CONTAINER_NAME }} ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \ No newline at end of file diff --git a/pages/members/03_hajung.md b/pages/members/03_hajung.md new file mode 100644 index 0000000..c4af7da --- /dev/null +++ b/pages/members/03_hajung.md @@ -0,0 +1,12 @@ +# 큰제목 +안녕하세요 +## 작은 제목 +안녕하세요 +# 큰제목 +안녕하세요 +## 작은 제목 +안녕하세요 +# 큰제목 +안녕하세요 +## 작은 제목 +안녕하세요 \ No newline at end of file