feat: add logout function #22
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build-and-deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ssh n update | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{secrets.SERVER_IP}} | |
| username: ${{secrets.SSH_USER}} | |
| key: ${{secrets.PROD_SSH_PRIVATE_KEY}} | |
| port: ${{secrets.SSH_PORT}} | |
| script: | | |
| # Explicitly set PATH to include go and pm2 | |
| export PATH=$PATH:/home/ubuntu/.nvm/versions/node/v22.14.0/bin:/home/ubuntu/.bun/bin | |
| # Source bashrc to load environment variables | |
| if [ -f ~/.bashrc ]; then | |
| source ~/.bashrc | |
| fi | |
| # Debug PATH to verify it includes the required directories | |
| echo $PATH | |
| cd /home/ubuntu/gcw-app/gcw-fe | |
| git pull origin main && bun install && bun run build && pm2 restart gcw-fe |