add github releases link to app page (#93) #11
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: DeFlock API Deploy | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - run: bun install | |
| working-directory: ./api | |
| - name: Configure SSH | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.VPS_SSH_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts | |
| - name: Sync files | |
| run: | | |
| rsync -az --delete \ | |
| --exclude node_modules \ | |
| ./api/ ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }}:/home/nullplate/deflock/api | |
| - name: Restart services | |
| run: | | |
| ssh ${{ secrets.VPS_USERNAME }}@${{ secrets.VPS_HOST }} " | |
| sudo systemctl restart deflock-api | |
| " |