Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
imruxin authored Nov 4, 2024
1 parent a5256ad commit 0611c9c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,25 @@ jobs:
export TZ='Asia/Shanghai'
git add .
git commit -m "update" -a
- name: 推送
- name: 更新仓库内容
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 安装 SSH key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H -p ${{ secrets.SSH_PORT }} ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: 配置 SSH
run: |
echo "Host ${{ secrets.SERVER_HOST }}" >> ~/.ssh/config
echo " Port ${{ secrets.SSH_PORT }}" >> ~/.ssh/config
echo " User ${{ secrets.SERVER_USER }}" >> ~/.ssh/config
- name: 同步 TV 文件夹到服务器
run: |
rsync -avz --delete ./tv/ ${{ secrets.SERVER_HOST }}:${{ secrets.REMOTE_PATH }}

0 comments on commit 0611c9c

Please sign in to comment.