From 178eb5e83f2b70f9695cda73e1aaa2814a63e438 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 20 Jul 2025 12:49:15 +0300 Subject: [PATCH] Add deploy script. --- .gitea/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..f328508 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Build and Deploy +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - name: Install prerequisites + run: apt update -y && apt install -y make php git curl + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Compile Web Pages + run: | + composer install + mkdir -p ./out + cp -r ./www ./out + cp -r ./vendor ./out + - name: SFTP Deploy + uses: wlixcc/SFTP-Deploy-Action@v1.2.5 + with: + username: '${{ vars.SSH_USER }}' + server: '${{ vars.SSH_SERVER }}' + port: '${{ vars.SSH_PORT }}' + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} + local_path: './out/*' + remote_path: '${{ vars.DESTINATION }}' + sftpArgs: -o ConnectTimeout=10 + rsyncArgs: --exclude=.*