deploye test ftp 3 #15
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 Django to cPanel | |
| on: | |
| push: | |
| branches: | |
| - main # change if your branch is different | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Collect static files | |
| env: | |
| DJANGO_SETTINGS_MODULE: config.settings | |
| SECRET_KEY: django-insecure-6d0sc!g!$b+ecm0!uttm8)zco12u72)*gmtc61j3n_t0(lgf7v | |
| DEBUG: "0" | |
| ALLOWED_HOSTS: "roshandamor.me, www.roshandamor.me" | |
| GITHUB_ACTIONS: "true" | |
| run: | | |
| python manage.py collectstatic --noinput | |
| - name: Deploy via FTP | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.5 | |
| with: | |
| server: roshandamor.me | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} # set this in GitHub Secrets | |
| protocol: ftp # try ftps first | |
| port: 21 | |
| server-dir: ./ | |
| passive: true | |
| security: loose | |
| log-level: verbose |