added turnstile in useTrackUrl #48
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 to Server (dev) | |
| on: | |
| push: | |
| branches: [dev] | |
| pull_request: | |
| branches: [dev] | |
| jobs: | |
| build_pr: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint -- --max-warnings=0 | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| deploy_push: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Deploy over SSH | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{ secrets.SSH_HOST }} | |
| username: ${{ secrets.SSH_USER }} | |
| key: ${{ secrets.SSH_KEY }} | |
| port: ${{ secrets.SSH_PORT || 22 }} | |
| script_stop: true | |
| script: | | |
| set -e | |
| cd ${{ secrets.APP_DIR }} | |
| git fetch --all --prune | |
| git checkout dev || git checkout -b dev | |
| # Force sync local dev to remote state to avoid divergence issues | |
| git reset --hard origin/dev | |
| git clean -fd | |
| # Install devDependencies too (vite/ts), build static assets | |
| npm ci --silent --no-audit --no-fund | |
| npm run build | |
| export NODE_ENV=production |