🔒 chore: 添加 GitHub 部署密钥到 .gitignore

This commit is contained in:
alger
2025-03-08 23:52:32 +08:00
parent ce276df55c
commit 7f8ab8be7c
2 changed files with 45 additions and 1 deletions

42
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Deploy Web
on:
push:
branches:
- dev_electron # 或者您的主分支名称
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Deploy to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
source: "out/renderer/*"
target: ${{ secrets.DEPLOY_PATH }}
strip_components: 2
- name: Execute Remote Commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
cd ${{ secrets.DEPLOY_PATH }}

4
.gitignore vendored
View File

@@ -21,4 +21,6 @@ bun.lockb
out out
.cursorrules .cursorrules
.github/deploy_keys