use plain scp
Some checks failed
Build and Deploy Resume Site / setup-website-content (push) Failing after 5s
Some checks failed
Build and Deploy Resume Site / setup-website-content (push) Failing after 5s
This commit is contained in:
parent
29670cbd01
commit
7de4926427
@ -6,6 +6,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup-website-content:
|
setup-website-content:
|
||||||
|
env:
|
||||||
|
remote_path: "/opt/nginx/test.shockrah.xyz"
|
||||||
|
ssh_target: "${{ secrets.USER }}@${{ secrets.HOST }}"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: shockrah/hugo
|
image: shockrah/hugo
|
||||||
@ -14,14 +17,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Build website content
|
- name: Build website content
|
||||||
run: hugo
|
run: hugo
|
||||||
- name: Check file content is present
|
- name: Setup ssh agent
|
||||||
run: pwd && ls -lRt public/
|
run: eval($(ssh-agent -s)
|
||||||
- name: SCP Files in public up to the remote ( prolly us ) server
|
- name: Add private key to agent
|
||||||
uses: appleboy/scp-action@master
|
run: echo ${{ secrets.PRIVATE_KEY }} | ssh-add - > /dev/null
|
||||||
with:
|
- name: Create tmp .ssh directory
|
||||||
HOST: ${{ secrets.HOST }}
|
run: mkdir -p ~/.ssh
|
||||||
USERNAME: ${{ secrets.USER }}
|
- name: Ensure perms on tmp .ssh directory
|
||||||
PORT: ${{ secrets.PORT }}
|
run: chmod 0700 ~/.ssh
|
||||||
KEY: ${{ secrets.PRIVATE_KEY }}
|
- name: SCP Files to resume web server
|
||||||
source: "public"
|
run: "scp -o UserKnownHostsFile=/dev/null -r public/ $ssh_target:$remote_path"
|
||||||
target: "/opt/nginx/test.shockrah.xyz"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user