update random image #87
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: update random image | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun install | |
- run: bun run build | |
env: | |
CF_KV_API_TOKEN: ${{ secrets.CF_KV_API_TOKEN }} | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_PAGES_API_TOKEN }} | |
accountId: b0dda00db555f237f277259bed93134b | |
packageManager: bun | |
command: pages deploy dist --project-name=img-tianheg --commit-dirty=true | |