chore: enable manual main workflow deploy #266
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
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Deploy website to server | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP with tools | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| tools: composer | |
| - name: Install PHP dependencies | |
| run: composer install | |
| - name: Generate API Documentation | |
| run: composer build | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install Node.js dependencies | |
| run: npm ci | |
| - name: Build CSS for production | |
| run: npm run build-css-prod | |
| - name: Build and deploy | |
| uses: jenshaase/deploy-zola-via-lftp-action@main | |
| with: | |
| ftp_host: ${{ secrets.ftp_host }} | |
| ftp_username: ${{ secrets.ftp_username }} | |
| ftp_password: ${{ secrets.ftp_password }} | |
| remote_target_dir: ${{ secrets.ftp_remote_target_dir }} |