From 7f8ab8be7c8e6cf40526f3110d38c0854a593250 Mon Sep 17 00:00:00 2001 From: alger Date: Sat, 8 Mar 2025 23:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20chore:=20=E6=B7=BB=E5=8A=A0=20Gi?= =?UTF-8?q?tHub=20=E9=83=A8=E7=BD=B2=E5=AF=86=E9=92=A5=E5=88=B0=20.gitigno?= =?UTF-8?q?re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++++++++ .gitignore | 4 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e19953b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2d6c168..4db262f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,6 @@ bun.lockb out -.cursorrules \ No newline at end of file +.cursorrules + +.github/deploy_keys \ No newline at end of file