From cbb4ad5a9a61e2e6e6c0896f4dcb8ee04cf646c7 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Sun, 3 Nov 2024 18:35:41 -0500 Subject: [PATCH 1/2] Update workflow name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7e901c..176b191 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Capture.The.Flag +name: CTF CI on: push: From 45d7b751868c69a37dad6689185bfe6d6d376535 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Sun, 3 Nov 2024 18:36:37 -0500 Subject: [PATCH 2/2] Add workflow to perform the deployment --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1f80990 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: CTF Deploy + +on: + push: + branches: + - main + - test + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Deploy using ssh + uses: appleboy/ssh-action@v1.1.0 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + key: ${{ secrets.PRIVATE_KEY }} + port: 22 + script: | + cd Capture-The-Flag + git pull origin dev + git status + sudo docker compose up --build -d \ No newline at end of file