chore(workflow): 调整Facebook部署工作流 #6
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: eploy via FTP | |
| on: | |
| push: | |
| branches: | |
| - master # 监听分支提交 | |
| # paths: | |
| # - "facebook/**" | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-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 PyInstaller | |
| run: | | |
| pip install pyinstaller | |
| # 读取并执行打包命令 | |
| - name: Build project | |
| run: | | |
| $command = Get-Content -Path "facebook\packaging_script\packaging.text" | |
| Invoke-Expression $command | |
| - name: Create release folder and zip executable | |
| run: | | |
| mkdir -p release | |
| apt-get install zip | |
| zip release/FBreptilever.zip dist/FBreptilever.exe | |
| - 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/test/ |