From 5ae59eaa85941d57b26b7c7a3bb76168931b98db Mon Sep 17 00:00:00 2001 From: Koen Baas Date: Wed, 23 Jul 2025 15:45:14 +0200 Subject: [PATCH 1/5] Add deploy file --- .gitea/workflows/deploy.yml | 6 +++++- .gitignore | 1 + README.md | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2ff64b2..51810e8 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,6 +28,10 @@ on: required: false type: string default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs + deploy-file: + required: false + type: string + default: deploy.php username: required: false type: string @@ -87,4 +91,4 @@ jobs: echo " StrictHostKeyChecking no" >> ~/.ssh/config - name: Deploy - run: vendor/bin/dep deploy environment="${{ inputs.environment }}" + run: vendor/bin/dep deploy ${{ inputs.environment }} --file=${{ inputs.deploy-file }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/README.md b/README.md index c6dde10..56e851c 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,11 @@ jobs: - **Default:** `${{ vars.REGISTRY_PASSWORD }}` - **Description:** Password for the Docker registry authentication. Defaults to the value stored in `vars.REGISTRY_PASSWORD`. +- **deploy-file** (optional): + - **Type:** `string` + - **Default:** `deploy.php` + - **Description:** The deployment file used by the Deployer tool. This file contains the deployment configuration and tasks. + ## Workflow Job: `deploy` The `deploy` job handles the core deployment process. It consists of multiple steps to set up dependencies, manage environment variables, build frontend assets, configure SSH, and deploy the application. -- 2.49.1 From 82f0988dc979ae2b183e02c6acb866e4525b4314 Mon Sep 17 00:00:00 2001 From: Koen Baas Date: Wed, 23 Jul 2025 16:26:41 +0200 Subject: [PATCH 2/5] Add directory --- .gitea/workflows/deploy.yml | 10 ++++------ README.md | 5 ----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 51810e8..2941e7b 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,10 +28,10 @@ on: required: false type: string default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs - deploy-file: + directory: required: false type: string - default: deploy.php + default: . username: required: false type: string @@ -50,13 +50,11 @@ jobs: username: ${{ inputs.username }} password: ${{ inputs.password }} steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup composer uses: https://git.qlic.nl/actions/setup-composer@v1 with: args: ${{ inputs.composer-args }} + directory: ${{ inputs.directory }} - name: Create .env file from secret if: ${{ secrets.env }} @@ -91,4 +89,4 @@ jobs: echo " StrictHostKeyChecking no" >> ~/.ssh/config - name: Deploy - run: vendor/bin/dep deploy ${{ inputs.environment }} --file=${{ inputs.deploy-file }} + run: vendor/bin/dep deploy ${{ inputs.environment }} diff --git a/README.md b/README.md index 56e851c..c6dde10 100644 --- a/README.md +++ b/README.md @@ -66,11 +66,6 @@ jobs: - **Default:** `${{ vars.REGISTRY_PASSWORD }}` - **Description:** Password for the Docker registry authentication. Defaults to the value stored in `vars.REGISTRY_PASSWORD`. -- **deploy-file** (optional): - - **Type:** `string` - - **Default:** `deploy.php` - - **Description:** The deployment file used by the Deployer tool. This file contains the deployment configuration and tasks. - ## Workflow Job: `deploy` The `deploy` job handles the core deployment process. It consists of multiple steps to set up dependencies, manage environment variables, build frontend assets, configure SSH, and deploy the application. -- 2.49.1 From a981a1ca8436dd614cf7839a942a0b5f14bd6773 Mon Sep 17 00:00:00 2001 From: Koen Baas Date: Wed, 23 Jul 2025 16:28:56 +0200 Subject: [PATCH 3/5] Add directory --- .gitea/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2941e7b..7a3eb5e 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -51,7 +51,7 @@ jobs: password: ${{ inputs.password }} steps: - name: Setup composer - uses: https://git.qlic.nl/actions/setup-composer@v1 + uses: https://git.qlic.nl/actions/setup-composer@24ab8f0c998dbd521cbc8ec3250ded68467ac647 with: args: ${{ inputs.composer-args }} directory: ${{ inputs.directory }} -- 2.49.1 From 39079e200da5483e53afeff1be193daec6ed561a Mon Sep 17 00:00:00 2001 From: Koen Baas Date: Wed, 23 Jul 2025 16:47:05 +0200 Subject: [PATCH 4/5] Add directory --- .gitea/workflows/deploy.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 7a3eb5e..c5a8878 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -28,10 +28,10 @@ on: required: false type: string default: --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs - directory: + working-directory: required: false type: string - default: . + default: ./ username: required: false type: string @@ -54,11 +54,12 @@ jobs: uses: https://git.qlic.nl/actions/setup-composer@24ab8f0c998dbd521cbc8ec3250ded68467ac647 with: args: ${{ inputs.composer-args }} - directory: ${{ inputs.directory }} + working-directory: ${{ inputs.working-directory }} - name: Create .env file from secret if: ${{ secrets.env }} run: echo "${{ secrets.env }}" > .env + working-directory: ${{ inputs.working-directory }} - name: Build if: ${{ inputs.node-package-manager }} @@ -76,17 +77,21 @@ jobs: if [ "${{ inputs.node-package-manager }}" != "none" ] && [ -n "${{ inputs.node-package-manager }}" ]; then ${{ inputs.node-package-manager }} run build fi + working-directory: ${{ inputs.working-directory }} - name: Set up SSH agent uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.ssh-private-key }} + working-directory: ${{ inputs.working-directory }} - name: Disable strict host key checking run: | echo "Host *" >> ~/.ssh/config echo " StrictHostKeyChecking no" >> ~/.ssh/config + working-directory: ${{ inputs.working-directory }} - name: Deploy run: vendor/bin/dep deploy ${{ inputs.environment }} + working-directory: ${{ inputs.working-directory }} -- 2.49.1 From bb6680569ae595caadef46c1d6aadfb07fc4653c Mon Sep 17 00:00:00 2001 From: Koen Baas Date: Wed, 23 Jul 2025 16:49:04 +0200 Subject: [PATCH 5/5] Add directory --- .gitea/workflows/deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c5a8878..01f902d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -51,11 +51,14 @@ jobs: password: ${{ inputs.password }} steps: - name: Setup composer - uses: https://git.qlic.nl/actions/setup-composer@24ab8f0c998dbd521cbc8ec3250ded68467ac647 + uses: https://git.qlic.nl/actions/setup-composer@39079e200da5483e53afeff1be193daec6ed561a with: args: ${{ inputs.composer-args }} working-directory: ${{ inputs.working-directory }} + - name: Set working directory + run: cd ${{ inputs.working-directory }} + - name: Create .env file from secret if: ${{ secrets.env }} run: echo "${{ secrets.env }}" > .env -- 2.49.1