feat: 添加dev-ci.yaml
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 5s
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 5s
This commit is contained in:
26
.gitea/workflows/dev-ci.yaml
Normal file
26
.gitea/workflows/dev-ci.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Gitea Actions Official-website
|
||||
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ gitea.actor }}
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
deploy-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.SERVER_SSH_KEY }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
|
||||
- name: Deploy application
|
||||
run: |
|
||||
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
|
||||
set -e
|
||||
cd /www/wwwroot/dev.ow.f2b211.com
|
||||
|
||||
# 拉取最新代码
|
||||
git pull --rebase
|
||||
EOF
|
||||
Reference in New Issue
Block a user