WIP, image gen integrated, but very messy #17
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: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # pull full history, as @inox-tools/content-utils relies on historical git times, not just latest commit | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - run: npm ci | |
| - run: npx wrangler whoami | |
| - name: Deploy preview | |
| if: "${{ github.ref_name != 'main' }}" | |
| env: | |
| IS_PREVIEW_ENV: true | |
| run: npm run build && npx wrangler versions upload --preview-alias "${{ github.ref_name }}" | |
| - name: Deploy production | |
| if: "${{ github.ref_name == 'main' }}" | |
| run: npm run build && npx wrangler deploy |