fmt #6
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - name: Deploy | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| run: | | |
| # build application | |
| pnpm install | |
| pnpm build:worker | |
| cp wrangler.toml.example wrangler.toml | |
| sed -i "s/{{DATABASE_ID}}/${{ secrets.CLOUDFLARE_DATABASE_ID }}/g" wrangler.toml | |
| # build website | |
| cd docs | |
| pnpm install | |
| pnpm build | |
| cp -r ./out/ ../dist/home | |
| cd .. | |
| pnpm deploy:worker |