Created
January 13, 2025 10:12
-
-
Save wowaTYPO3/6765e0b3e3a3fc7385d7d96769ca4b54 to your computer and use it in GitHub Desktop.
.github/workflows/deploy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: production | |
cancel-in-progress: false | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install PHP and Composer | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: mbstring, intl | |
- name: Install Deployer | |
run: | | |
composer global require deployer/deployer | |
export PATH="$HOME/.composer/vendor/bin:$PATH" | |
- name: SSH-Agent starten und Schlüssel hinzufügen | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: SSH konfigurieren | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
#echo "Host *" >> ~/.ssh/config | |
#echo " StrictHostKeyChecking no" >> ~/.ssh/config | |
#chmod 644 ~/.ssh/config | |
chmod 644 ~/.ssh/known_hosts | |
- name: Abhängigkeiten installieren | |
run: | | |
composer install --no-dev --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs | |
- name: Deployment auf Produktion | |
run: | | |
dep deploy production -vvv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment