Skip to navigation
Forgejo example action script to update with ssh and scp
04.05.26
forgejo example action script to update with ssh ```yaml on: [push] jobs: test: runs-on: docker3 steps: - name: Update run: | apt-get update -y - name: checkout run: | git clone http://code.com/sub_dash.git cd sub_dash/frontend npm install npm run build - name: SSH run: | mkdir -p ~/.ssh cat > ~/.ssh/id_ed25519 << 'EOF' -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW ANzA55LIv5LEXmgd2sdDAAAACXJvb3RAY29kZQECAwQ= -----END OPENSSH PRIVATE KEY----- EOF chmod 600 ~/.ssh/id_ed25519 ssh-keyscan -H 192.168.80.240 >> ~/.ssh/known_hosts ssh-keyscan -H 192.168.80.239 >> ~/.ssh/known_hosts ls ~/.ssh/ -all cat ~/.ssh/id_ed25519 - name: scp_frontend run: | cd sub_dash/frontend scp -r dist root@192.168.80.240:/var/customers/webs/vapi/sub_dash/ ssh root@192.168.80.240 "chown 1022:1022 /var/customers/webs/vapi/ -Rf" - name: scp_backend run: | cd sub_dash/ scp -r backend root@192.168.80.239:/opt/sub_dash/ ssh root@192.168.80.239 "pm2 restart sub-dashboard" ```
Reply
Anonymous
Information Epoch 1778392312
Favor apps that have universal interfaces.
Home
Notebook
Contact us