add gitea rsync
All checks were successful
Build / build (push) Successful in 5m17s

This commit is contained in:
Tomoya Matsuura(MacBookPro) 2024-02-06 12:25:52 +09:00
parent dd0fc02c48
commit a8c6e06187

View File

@ -26,16 +26,15 @@ jobs:
extended: true
- name: Run Hugo
run: hugo --minify
- name: upload artifacs
uses: https://github.com/actions/upload-artifact@v3
with:
name: "test2"
path: "public/**"
# - name: Create private key
# run: |
# echo "${{ secrets.PRIVATE_KEY }}" > /tmp/act_runner_key
# chmod 600 /tmp/act_runner_key
# - name: rsync public directory
# run: |
# rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no -p ${{ vars.WEBSERVER_PORT }}" ${{ gitea.workspace }}/public/* ${{ vars.WEBSERVER_USER }}@${{ vars.WEBSERVER_HOST }}:/var/www/html
# - name: upload artifacs
# uses: https://github.com/actions/upload-artifact@v3
# with:
# name: "test2"
# path: "public/**"
- name: Create private key
run: |
echo "${{ secrets.PRIVATE_KEY }}" > /tmp/act_runner_key
chmod 600 /tmp/act_runner_key
- name: rsync public directory
run: |
rsync -avz --delete -e "ssh -i /tmp/act_runner_key -o StrictHostKeyChecking=no -p ${{ vars.WEBSERVER_PORT }}" ${{ gitea.workspace }}/public/* ${{ vars.WEBSERVER_USER }}@${{ vars.WEBSERVER_HOST }}:/var/www/html