Files
go-receipt-tracker/.github/workflows/deploy.yml
Alex Savin 27a2abc35c
All checks were successful
Deploy Project / deploy (push) Successful in 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 48s
Build and Push Docker Image / build-and-push (push) Successful in 10m6s
More changes
2025-02-11 18:29:19 -05:00

40 lines
935 B
YAML

name: Deploy Project
on:
push:
branches: [develop]
paths-ignore:
- 'README.md'
# - '.github/**'
pull_request:
branches: [develop]
paths-ignore:
- 'README.md'
# - '.github/**'
jobs:
deploy:
runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Setup SSH
shell: bash
run: |
whoami
eval `ssh-agent -s`
mkdir -p ~/.ssh/
touch ~/.ssh/id_rsa
echo "${{secrets.SSH_KEY}}" | tr -d '\r' > ~/.ssh/id_rsa
chmod 700 ~/.ssh/id_rsa
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: SSH to the Prod env
shell: bash
run: |
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'whoami'
#