Merge pull request #129 from SmoFlaDru/dev-benno #2
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 to server via docker image | ||
on: | ||
push: | ||
branches: [ "master", "workflow_dispatch" ] | ||
workflow_dispatch: | ||
jobs: | ||
deploy: | ||
Check failure on line 8 in .github/workflows/deploy-docker.yml GitHub Actions / Deploy to server via docker imageInvalid workflow file
|
||
name: Deploy to Server | ||
needs: build-push-deploy-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: upload infrastructure files | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_SECONDARY_HOST }} | ||
username: ${{ secrets.SSH_SECONDARY_USERNAME }} | ||
password: ${{ secrets.SSH_SECONDARY_PASSWORD }} | ||
port: ${{ secrets.SSH_SECONDARY_PORT }} | ||
source: infrastructure/* | ||
target: . | ||
- name: execute remote ssh commands | ||
uses: appleboy/ssh-action@master | ||
env: | ||
SECRET: ${{ secrets.ENV_FILE }} | ||
COMMIT_SHA: ${{ github.sha }} | ||
with: | ||
host: ${{ secrets.SSH_SECONDARY_HOST }} | ||
username: ${{ secrets.SSH_SECONDARY_USERNAME }} | ||
password: ${{ secrets.SSH_SECONDARY_PASSWORD }} | ||
port: ${{ secrets.SSH_SECONDARY_PORT }} | ||
envs: SECRET,COMMIT_SHA | ||
script: | | ||
cd Spybot2 | ||
echo "$SECRET" > .env | ||
docker-compose -f docker-compose-deploy.yml up |