name: Build & Depoly on: [push] jobs: depoly: runs-on: docker container: image: node:20-bullseye name: Depoly blog steps: - name: Install git-lfs run: apt update -y && apt install -y git-lfs - name: Checkout uses: actions/checkout@v4 with: submodules: true # Checkout private submodules(themes or something else). - name: Checkout LFS run: | UrlBase=$GITHUB_SERVER_URL; \ UrlLfsBase=$UrlBase/${{ github.repository }}.git/info/lfs/objects; \ Auth=`/usr/bin/git config --get --local http.$UrlBase/.extraheader`; \ /usr/bin/git config --local http.${UrlLfsBase}/batch.extraheader "$Auth"; \ /usr/bin/git config --local http.${UrlLfsBase}/.extraheader '' git config --local lfs.transfer.maxretries 1 git lfs fetch origin refs/remotes/origin/${{ github.ref_name }} git lfs checkout - name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version-file: "package.json" - name: Cache Dependencies uses: actions/cache@v4 with: path: ~/.bun/install/cache key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }} restore-keys: | ${{ runner.os }}-${{ matrix.bun }}-bun- - name: Install Dependencies run: bun install - name: Build Website run: bun dist - name: Depoly Website uses: https://github.com/cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} command: pages deploy --project-name=rubicons-blog dist