π move to cloudflare pages #45
This file contains 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: ci | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v3 | |
- name: Install pnpm π¦ | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Setup NodeJS π | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install Deps 𧩠| |
run: pnpm install | |
- name: Build π¨ | |
run: pnpm run build | |
- name: Publish π | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy ./dist --project-name=dvjn --branch="${{ github.head_ref || github.ref_name }}" --commit-hash="${{ github.sha }}" |