Some changes
This commit is contained in:
36
.github/workflows/deploy.yml
vendored
Normal file
36
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
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
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup SSH
|
||||
shell: bash
|
||||
run: |
|
||||
eval `ssh-agent -s`
|
||||
mkdir -p /home/runner/.ssh/
|
||||
touch /home/runner/.ssh/id_rsa
|
||||
echo -e "${{secrets.SSH_KEY}}" > /home/runner/.ssh/id_rsa
|
||||
chmod 700 /home/runner/.ssh/id_rsa
|
||||
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> /home/runner/.ssh/known_hosts
|
||||
|
||||
- name: SSH to the Prod env
|
||||
shell: bash
|
||||
run: |
|
||||
ssh gitea@${{secrets.SSH_HOST}}
|
||||
whoiam
|
Reference in New Issue
Block a user