workflow
This commit is contained in:
parent
4f8fce20f0
commit
beaefff208
1 changed files with 31 additions and 0 deletions
31
.gitea/workflows/portal-prod.yaml
Normal file
31
.gitea/workflows/portal-prod.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Deploy powerbar.ti Frontend Portal
|
||||
run-name: ${{ gitea.actor }} is deploying the frontend.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
Deploy-Tinance2-Frontend-Portal-Production:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh/
|
||||
echo "${{ secrets.SSH_KEY }}" | tr -d '\r' > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
cat >>~/.ssh/config <<END
|
||||
Host production
|
||||
HostName 10.209.60.143
|
||||
User root
|
||||
StrictHostKeyChecking no
|
||||
END
|
||||
cat ~/.ssh/config
|
||||
env:
|
||||
SSH_USER: ${{ secrets.SSH_USER }}
|
||||
SSH_KEY: ${{ secrets.SSH_KEY }}
|
||||
|
||||
- name: Production Update Portal
|
||||
run: ssh production 'bash /root/deploy_portal_script.sh'
|
Loading…
Reference in a new issue