Exempt /static/ from rate limiting to fix 503s on asset loading #177
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: production-deploy | |
| on: | |
| push: | |
| branches: | |
| - public-rev-proxy | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Run deploy on production | |
| uses: appleboy/ssh-action@v1.0.0 | |
| with: | |
| host: ${{ secrets.NEW_SSH_HOST }} | |
| username: ${{ secrets.NEW_SSH_USERNAME }} | |
| key: ${{ secrets.NEW_SSH_KEY }} | |
| port: ${{ secrets.NEW_SSH_PORT }} | |
| script_stop: true | |
| script: | | |
| cd /home/programming/nginx-conf | |
| git fetch origin | |
| git checkout origin/${{ steps.extract_branch.outputs.branch }} | |
| git pull origin ${{ steps.extract_branch.outputs.branch }} | |
| rm -rf /etc/nginx/sites-enabled | |
| if [ -d sites-enabled ]; then | |
| cp -rT sites-enabled/ /etc/nginx/sites-enabled/ | |
| fi | |
| rm -rf /etc/nginx/sites-available | |
| if [ -d sites-available ]; then | |
| cp -rT sites-available/ /etc/nginx/sites-available/ | |
| fi | |
| rm /etc/nginx/nginx.conf | |
| if [ -f nginx.conf ]; then | |
| cp nginx.conf /etc/nginx/nginx.conf | |
| fi | |
| nginx -t | |
| sudo nginx -s reload |