name: deploy website on: push: branches: - main workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: restore cached node modules uses: actions/cache/restore@v4 id: cache-node-modules with: path: node_modules key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }} - name: install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: bun install - name: build run: bun run build - name: upload statics as artifact id: deployment uses: actions/upload-pages-artifact@v3 with: path: dist/ deploy: needs: build runs-on: ubuntu-latest permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: deploy to pages id: deployment uses: actions/deploy-pages@v4