github actions 失灵了
前几天添加了一段自动删除某文件夹下的代码,结果忘了切换文件夹,把服务器面板和配置文件都给删了。
数据没有备份,只好把面板里的数据一个一个的填回去。
服务器修复之后,github actions 就失灵了。
服务器上放着一个小网站,我更想到github之后,使用github actions用ftp服务把代码同步到服务器,然后调用webhooks重启服务。
这突然失灵了就让人恼火。
actions 代码如下
# This is a basic workflow to help you get started with Actions name: FTP部署 # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master ] pull_request: branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: web-deploy: name: 🎉 开始部署 runs-on: ubuntu-latest steps: - name: 🚚 获取最新代码 uses: actions/checkout@v2 - name: 📂 同步文件 uses: SamKirkland/FTP-Deploy-Action@4.0.0 with: server: ${{ secrets.FTP_IP }} username: ${{ secrets.FTP_USER }} password: ${{ secrets.FTP_PASSWORD }} #调用宝塔那边的webhook重启python运行环境,让整个项目生效。 - name: 调用webhook uses: distributhor/workflow-webhook@v1 env: webhook_url: ${{ secrets.WEBHOOK_URL }} webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
错误代码如下
No file exists on the server "./.ftp-deploy-sync-state.json" - this much be your first publish! 🎉 The first publish will take a while... but once the initial sync is done only differences are published! If you get this message and its NOT your first publish, something is wrong. ---------------------------------------------------------------- Local Files: 54 Server Files: 54 ---------------------------------------------------------------- Calculating differences between client & server ---------------------------------------------------------------- ➕ Upload: requirements.txt ➕ Upload: runserver.py 📁 Create: xlsx2vcf ➕ Upload: xlsx2vcf.pyproj ---------------------------------------------------------------- Making changes to 54 files to sync server state Uploading: 1.55 MB -- Deleting: 0 B -- Replacing: 0 B ---------------------------------------------------------------- creating folder "xlsx2vcf/" Error: Client is closed at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3704:29 at new Promise (<anonymous>) at FTPContext.handle (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3684:16) at Client.sendIgnoringError (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:2745:25) at Client._openDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3251:20) at Client.ensureDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3242:24) at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:1962:121 at Generator.next (<anonymous>) at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:1823:71 at new Promise (<anonymous>) Closing reason: Error: Timeout (control socket) at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3793:58) at Object.onceWrapper (events.js:299:28) at Socket.emit (events.js:210:5) at Socket._onTimeout (net.js:469:8) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) { code: '0' } Error: Client is closed at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3704:29 at new Promise (<anonymous>) at FTPContext.handle (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3684:16) at Client.sendIgnoringError (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:2745:25) at Client._openDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3251:20) at Client.ensureDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3242:24) at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:1962:121 at Generator.next (<anonymous>) at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:1823:71 at new Promise (<anonymous>) Closing reason: Error: Timeout (control socket) at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3793:58) at Object.onceWrapper (events.js:299:28) at Socket.emit (events.js:210:5) at Socket._onTimeout (net.js:469:8) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) { code: '0' } ---------------------------------------------------------------- Time spent hashing: 51 milliseconds Time spent connecting to server: 1.9 seconds Time spent deploying: 3 milliseconds (574 MB/second) - changing dirs: 430 milliseconds - logging: 152 milliseconds ---------------------------------------------------------------- Total time: 32.6 seconds ----------------------------------------------------------------
研究了两三个小时也没有明白是哪里的问题。
一定是服务器的问题,因为这段actions上传到我的这个服务器就没有任何问题。
不是ftp账号的问题,这个ftp账号用其他客户端上传下载没有问题;使用其他ftp账号也是一样的错误;重建了这个ftp账号也是一样的错误
版权声明:
作者:xinyu2ru
链接:https://www.rxx0.com/software/github_actions_shi_ling_le.html
来源:RUBLOG-分享我的生活
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论