--- title: "Test CI CD" date: 2024-02-19T00:23:09+08:00 draft: false --- = 测试github ation自动发布(Test CI CD on github)

请chatGPT帮助我写了一个脚本,用于测试github action自动发布功能。

``` name: Deploy to Ubuntu Server

on: push: branches: - main # or your preferred branch

jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2

  • name: Deploy to Server uses: appleboy/ssh-action@master with: host: ${{ secrets.SERVER_HOST }} username: ${{ secrets.SERVER_USER }} password: ${{ secrets.SERVER_PASSWORD }} # or use key: ${{ secrets.SSH_PRIVATE_KEY }} port: ${{ secrets.SERVER_PORT }} script: | cd /path/to/your/hugo/project git pull origin main ./autodeploy.sh

```

我就是测试一下。++