更新..11/5 #28
This file contains hidden or 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 via FTP | |
| on: | |
| push: | |
| branches: | |
| - master | |
| # paths: | |
| # - "facebook/**" | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install rely | |
| run: | | |
| pip install pyinstaller | |
| pip install PyQt5 | |
| pip install pyodbc | |
| pip install pyperclip | |
| pip install pythonnet | |
| pip install playwright | |
| pip install qasync | |
| pip install aiohttp | |
| pip install requests | |
| pip install setuptools | |
| # 读取并执行打包命令 | |
| - name: Build project | |
| run: | | |
| $command = Get-Content -Path "facebook\packaging_script\packaging.text" | |
| Invoke-Expression $command | |
| - name: Create release folder and zip executable | |
| run: | | |
| New-Item -ItemType Directory -Force -Path release\ | |
| # 将 FBrereptilever.exe 压缩为 ZIP 文件 | |
| Compress-Archive -Path "dist\FBreptilever.exe" -DestinationPath "release\FBreptilever.zip" | |
| - name: Upload to server via FTP | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.6 | |
| with: | |
| server: ${{ secrets.FTP_SERVER }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| protocol: ftp | |
| port: ${{ secrets.FTP_PORT }} | |
| local-dir: release/ | |
| server-dir: /UpData/FBfans/ | |
| timeout: 3600000 |