Release v1.3.0 — Phase 1 feature set #29
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 offi.ceo VPS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Deploy via SSH | |
| uses: appleboy/ssh-action@v0.1.7 | |
| with: | |
| host: ${{ secrets.VPS_HOST }} | |
| username: ${{ secrets.VPS_USER }} | |
| key: ${{ secrets.VPS_KEY }} | |
| script: | | |
| # everything inside this single bash -lc runs as a login shell | |
| bash -lc ' | |
| set -e | |
| cd ${{ secrets.VPS_PROJECT_PATH }} | |
| echo "➡️ Ensure GitHub in known_hosts" | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| echo "➡️ Fetch & reset to origin/main" | |
| git fetch --all | |
| git reset --hard origin/main | |
| echo "➡️ Install deps" | |
| npm install | |
| echo "➡️ Clean old build" | |
| rm -rf dist | |
| echo "➡️ Build fresh" | |
| npm run build | |
| echo "✅ Deploy complete!" | |
| ' |