chore: remake website with Astro #1
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: Build and Deploy Page to VPS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".gitignore" | |
| - "src/**" | |
| - "package*.json" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'latest' | |
| cache: 'npm' | |
| - name: Install Node.js Dependencies | |
| run: npm install | |
| - name: Build Astro website | |
| run: npm run build | |
| # Deploy to VPS over SSH | |
| - name: Deploy Book to VPS | |
| uses: https://github.com/appleboy/scp-action@v1 | |
| with: | |
| host: ${{ secrets.VPS_IP }} | |
| username: actions | |
| key: ${{ secrets.VPS_PRIV_KEY }} | |
| port: 22 | |
| source: "dist" | |
| target: "/home/actions/kitlang.dev" | |
| strip_components: 1 | |
| rm: true |