add news #64
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: Deploy Wechat bot | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- LICENSE | |
- README.md | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 下载机器人源码 | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
key: ${{ secrets.SERVER_SSH_KEY }} | |
source: "./" | |
target: "/home/ubuntu/tubex-wechatbot" | |
- name: 安装依赖并启动机器人 | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USERNAME }} | |
key: ${{ secrets.SERVER_SSH_KEY }} | |
script: | | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
cd /home/ubuntu/.nvm | |
source ./nvm.sh | |
nvm use 22 | |
npm install -g yarn | |
cd /home/ubuntu/tubex-wechatbot | |
yarn |