File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Per SSH im VPS einloggen und eine Datei erstellen
2+ run-name : ${{ github.actor }} testet stuff
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout Code
12+ uses : actions/checkout@v4
13+
14+ - name : Setup SSH
15+ uses : webfactory/ssh-agent@v0.9.0
16+ with :
17+ ssh-private-key : ${{ secrets.VPS_SSH_KEY }}
18+
19+ - name : Erstelle Testdatei
20+ run : |
21+ ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'
22+ cd /home/deployments/
23+ touch "Test Github Action - $(date)"
24+ ls
25+ EOF
26+
27+
28+ # - name: Copy Files to VPS
29+ # run: |
30+ # scp -o StrictHostKeyChecking=no -r . ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:${{ secrets.VPS_DOCKER_DIR }}
31+ #
32+ # - name: Rebuild & Restart Docker Container
33+ # run: |
34+ # ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'
35+ # cd ${{ secrets.VPS_DOCKER_DIR }}
36+ # docker build -t larsw-homepage .
37+ # docker stop larsw-homepage || true
38+ # docker rm larsw-homepage || true
39+ # docker run -d --name larsw-homepage -p 80:3000 larsw-homepage
40+ # EOF
You can’t perform that action at this time.
0 commit comments