Update .env #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish And Deploy | |
on: | |
push: | |
branches: | |
- 'main' # 这里可以替换为你希望触发工作流程的分支名称 | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Deploy | |
uses: cross-the-world/ssh-scp-ssh-pipelines@master | |
env: | |
OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }} | |
with: | |
host: ${{ secrets.HOST }} | |
user: ${{ secrets.USERNAME }} | |
pass: ${{ secrets.PASSWORD }} | |
port: ${{ secrets.PORT }} | |
connect_timeout: 10s | |
first_ssh: | | |
rm -rf /root/ai-tools-srv/* | |
scp: | | |
'./*' => /root/ai-tools-srv/ | |
last_ssh: | | |
export OPENAI_ACCESS_TOKEN=$OPENAI_ACCESS_TOKEN | |
cd /root/ai-tools-srv | |
chmod +x deploy.sh | |
./deploy.sh |