π UI tweaks #15
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 Astro site & deploy to server | |
| on: | |
| push: | |
| branches: ['main'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'build' | |
| cancel-in-progress: true | |
| env: | |
| BUILD_PATH: '.' | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 8 | |
| run_install: true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| working-directory: ${{ env.BUILD_PATH }} | |
| - name: Build with Astro | |
| run: pnpm astro build | |
| working-directory: ${{ env.BUILD_PATH }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: dist | |
| path: dist | |
| deploy: | |
| name: Deploy to server | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: KessokuTeaTime/action-kessoku-private-ci@main | |
| with: | |
| auth: ${{ secrets.KTT_API_TOKEN }} | |
| endpoint: ${{ vars.KTT_API_ENDPOINT }} | |
| payload: | | |
| { | |
| "run_id": "${{ github.run_id }}", | |
| "dest": "www" | |
| } |