A CLI for publishing standard.site documents to ATProto

perf: cache dependencies and build artifacts in GitHub Action

Skip bun install and build when bun.lock and source files haven't
changed, avoiding re-downloading 428MB of deps on every run.

+26 -6
+26 -6
action.yml
··· 34 34 - name: Setup Bun 35 35 uses: oven-sh/setup-bun@v2 36 36 37 - - name: Build and install Sequoia CLI 37 + - name: Cache dependencies 38 + id: deps-cache 39 + uses: actions/cache@v4 40 + with: 41 + path: ${{ github.action_path }}/node_modules 42 + key: sequoia-deps-${{ runner.os }}-${{ hashFiles(format('{0}/bun.lock', github.action_path)) }} 43 + 44 + - name: Install dependencies 45 + if: steps.deps-cache.outputs.cache-hit != 'true' 38 46 shell: bash 39 - run: | 40 - cd ${{ github.action_path }} 41 - bun install 42 - bun run build:cli 43 - bun link --cwd packages/cli 47 + run: cd ${{ github.action_path }} && bun install 48 + 49 + - name: Cache build artifacts 50 + id: build-cache 51 + uses: actions/cache@v4 52 + with: 53 + path: ${{ github.action_path }}/packages/cli/dist 54 + key: sequoia-build-${{ runner.os }}-${{ hashFiles(format('{0}/bun.lock', github.action_path), format('{0}/packages/cli/src/**', github.action_path)) }} 55 + 56 + - name: Build CLI 57 + if: steps.build-cache.outputs.cache-hit != 'true' 58 + shell: bash 59 + run: cd ${{ github.action_path }} && bun run build:cli 60 + 61 + - name: Link CLI 62 + shell: bash 63 + run: cd ${{ github.action_path }} && bun link --cwd packages/cli 44 64 45 65 - name: Sync state from ATProtocol 46 66 shell: bash