From 52f5816ee661d29e4664357eff30595a7152be2c Mon Sep 17 00:00:00 2001 From: xiehaijun Date: Sun, 27 Jul 2025 09:38:16 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/demo.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 发布生产 --- .gitea/workflows/demo.yaml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index bde95f3..31b23ab 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -110,4 +110,32 @@ jobs: echo 'docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}"' echo 'docker build -t .' echo 'docker push :latest' - docker info \ No newline at end of file + docker info + 发布应用: + needs: 构建应用 + runs-on: ubuntu-latest + steps: + - name: 执行远程 SSH 命令 + uses: appleboy/ssh-action@v1 + env: + FOO: "BAR" + BAR: "FOO" + with: + host: ${{ vars.DEPLOY_HOST }} + # host: "foo.com:1234,bar.com:5678" + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + # key: ${{ secrets.KEY }} + # passphrase: ${{ secrets.PASSPHRASE }} + port: ${{ vars.PORT }} + # sync: true + envs: FOO,BAR + # script_path: scripts/script.sh + script: | + whoami + ls -al + echo "I am $FOO" + - name: 列出工作目录列表 + run: | + ls ${{ gitea.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file