Skip to content

Commit

Permalink
dont deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sharrlotte committed Oct 26, 2024
1 parent 393c501 commit dde239f
Showing 1 changed file with 60 additions and 60 deletions.
120 changes: 60 additions & 60 deletions .github/workflows/ec2deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
# name: Build on DockerHub and Deploy to OVH Cloud
# on:
# push:
# branches:
# - main
# env:
# DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
# DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# context: ./
# push: true
# dockerfile: ./Dockerfile
# tags: nguyenhau2003/mindustry-gpt:latest
name: Build on DockerHub and Deploy to OVH Cloud
on:
push:
branches:
- main
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
push: true
dockerfile: ./Dockerfile
tags: nguyenhau2003/mindustry-gpt:latest


# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ env.DOCKERHUB_USERNAME }}
# password: ${{ env.DOCKERHUB_TOKEN }}
# deploy:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ env.DOCKERHUB_USERNAME }}
# password: ${{ env.DOCKERHUB_TOKEN }}

# - name: copy files to target server via scp
# uses: appleboy/scp-action@v0.1.3
# with:
# host: ${{ secrets.OVH_CLOUD_IP }}
# username: ${{ secrets.OVH_CLOUD_USERNAME }}
# password: ${{ secrets.OVH_CLOUD_PASSWORD }}
# source: "./docker-compose.yml"
# target: "~/.deploy/${{github.event.repository.name }}/"
# - name: copy files to target server via scp
# uses: appleboy/scp-action@v0.1.3
# with:
# host: ${{ secrets.OVH_CLOUD_IP }}
# username: ${{ secrets.OVH_CLOUD_USERNAME }}
# password: ${{ secrets.OVH_CLOUD_PASSWORD }}
# source: "./docker-compose.yml"
# target: "~/.deploy/${{github.event.repository.name }}/"

# - name: Pull image
# uses: appleboy/ssh-action@v1.0.3
# with:
# host: ${{ secrets.OVH_CLOUD_IP }}
# username: ${{ secrets.OVH_CLOUD_USERNAME }}
# password: ${{ secrets.OVH_CLOUD_PASSWORD }}
# context: ./
# script: |
# sudo docker login --username nguyenhau2003 -p ${{ env.DOCKERHUB_TOKEN }}
# cd ~/.deploy/${{github.event.repository.name}}
# sudo docker compose -f ./docker-compose.yml pull
# sudo docker rm -f mindustry-gpt
# sudo docker compose -f ./docker-compose.yml -p mindustry-gpt up -d
# # - name: Pull image
# # uses: appleboy/ssh-action@v1.0.3
# # with:
# # host: ${{ secrets.OVH_CLOUD_IP }}
# # username: ${{ secrets.OVH_CLOUD_USERNAME }}
# # password: ${{ secrets.OVH_CLOUD_PASSWORD }}
# # context: ./
# # script: |
# # sudo docker login --username nguyenhau2003 -p ${{ env.DOCKERHUB_TOKEN }}
# # cd ~/.deploy/${{github.event.repository.name}}
# # sudo docker compose -f ./docker-compose.yml pull
# # sudo docker rm -f mindustry-gpt
# # sudo docker compose -f ./docker-compose.yml -p mindustry-gpt up -d

0 comments on commit dde239f

Please sign in to comment.