From 560fc865b131ba8cbb21451e3613773a9a7dd08d Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Sat, 16 Aug 2025 14:45:17 -0600 Subject: [PATCH] Adding CI deployment job definitions for staging and production servers --- .gitea/workflows/release.yml | 22 ++++++++++++++++++++++ .gitea/workflows/stage.yml | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .gitea/workflows/release.yml create mode 100644 .gitea/workflows/stage.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..ad7bbf8 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,22 @@ +name: Deploy to production webserver +run-name: ${{ gitea.actor }} is deploying to production environment +on: + push: + branches: [ staging ] + workflow_dispatch: + +jobs: + Deploy-To-Staging: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Deploy via SFTP + uses: appleboy/scp-action@master + with: + host: ${{ secrets.PRODUCTION_SFTP_HOST }} + username: ${{ secrets.PRODUCTION_SFTP_USERNAME }} + key: ${{ secrets.PRODUCTION_SFTP_PRIVATE_KEY }} + source: "www/" + target: "~/web/jnf.me/public_html/" + strip_components: 1 \ No newline at end of file diff --git a/.gitea/workflows/stage.yml b/.gitea/workflows/stage.yml new file mode 100644 index 0000000..d06c827 --- /dev/null +++ b/.gitea/workflows/stage.yml @@ -0,0 +1,22 @@ +name: Deploy to staging webserver +run-name: ${{ gitea.actor }} is deploying to staging environment +on: + push: + branches: [ staging ] + workflow_dispatch: + +jobs: + Deploy-To-Staging: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Deploy via SFTP + uses: appleboy/scp-action@master + with: + host: ${{ secrets.STAGING_SFTP_HOST }} + username: ${{ secrets.STAGING_SFTP_USERNAME }} + key: ${{ secrets.STAGING_SFTP_PRIVATE_KEY }} + source: "www/" + target: "~/web/jnf.dev.jnf.me/public_html/" + strip_components: 1 \ No newline at end of file