feat: add deployment to production
Some checks failed
Build / deploy-stage (push) Blocked by required conditions
Build / switch-stage (push) Blocked by required conditions
Build / deploy-production (push) Blocked by required conditions
Build / build (push) Has been cancelled

This commit is contained in:
2024-12-20 20:04:01 +01:00
parent c227b17d7f
commit 5b332a1675
3 changed files with 27 additions and 40 deletions

View File

@@ -28,14 +28,7 @@ jobs:
with:
php-version: ${{ env.PHP_VERSION }}
- name: Check if composer.json exists
id: check_files
uses: andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673
with:
files: 'composer.json'
- name: Run composer install if composer.json exists
if: steps.check_files.outputs.files_exists == 'true'
run: |
composer validate --no-check-publish && composer install --prefer-dist --no-progress --ignore-platform-reqs
@@ -109,28 +102,28 @@ jobs:
dep: --file=./build/deploy.php release:switch stage
private-key: ${{secrets.STAGE_KEY}}
# deploy-production:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Setup PHP
# uses: shivammathur/setup-php@7c0b4c8c8ebed23eca9ec2802474895d105b11bc
# with:
# php-version: ${{ env.PHP_VERSION }}
# - uses: actions/download-artifact@v3
# with:
# name: typo3
# - name: Extract artifact
# run: |
# tar xf typo3.tar.gz
# rm typo3.tar.gz
# - name: Install ssh agent and rsync
# run: |
# apt update
# apt install -y openssh-client rsync
# - name: Deploy
# uses: deployphp/action@v1
# with:
# deployer-binary: "./bin/dep"
# dep: --file=./build/deploy.php release:create production
# private-key: ${{secrets.PROD_KEY}}
deploy-production:
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@7c0b4c8c8ebed23eca9ec2802474895d105b11bc
with:
php-version: ${{ env.PHP_VERSION }}
- uses: actions/download-artifact@v3
with:
name: typo3
- name: Extract artifact
run: |
tar xf typo3.tar.gz
rm typo3.tar.gz
- name: Install ssh agent and rsync
run: |
apt update
apt install -y openssh-client rsync
- name: Deploy
uses: deployphp/action@v1
with:
deployer-binary: "./bin/dep"
dep: --file=./build/deploy.php release:create production
private-key: ${{secrets.PROD_KEY}}

View File

@@ -20,13 +20,7 @@ jobs:
uses: shivammathur/setup-php@7c0b4c8c8ebed23eca9ec2802474895d105b11bc
with:
php-version: ${{ env.PHP_VERSION }}
- name: Check if composer.json exists
id: check_files
uses: andstor/file-existence-action@87d74d4732ddb824259d80c8a508c0124bf1c673
with:
files: 'composer.json'
- name: Run composer install if composer.json exists
if: steps.check_files.outputs.files_exists == 'true'
- name: Run composer install
run: |
composer validate --no-check-publish && composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Install ssh agent, rsync

View File

@@ -2,7 +2,7 @@ hosts:
production:
stage: production
hostname: web-arm.cloonar.com
remote_user: gbv_aktuell_at
remote_user: lena_schilling_at
writable_mode: chmod
forward_agent: true
deploy_path: ~/