more wrangler changes #148
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: Check | |
on: [push] | |
jobs: | |
Web-Test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: Web | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Enable corepack | |
run: | | |
corepack enable && | |
corepack install | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install | |
run: pnpm install | |
- name: Format | |
run: pnpm -r format | |
- name: Typecheck | |
run: pnpm -r typecheck | |
- name: Test | |
run: pnpm -r test | |
Deploy-Check: | |
runs-on: ubuntu-latest | |
needs: [Web-Test] | |
if: github.ref == 'refs/heads/main' | |
defaults: | |
run: | |
working-directory: Web | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Enable corepack | |
run: | | |
corepack enable && | |
corepack install | |
- name: pnpm Build | |
run: pnpm install | |
- name: Build Checker | |
run: pnpm build | |
working-directory: Web/packages/check | |
- name: Publish | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
workingDirectory: Web/packages/check | |
packageManager: pnpm | |
- name: Fix permissions of `.wrangler`. See https://github.com/shumbo/Svadilfari/issues/44 | |
run: sudo chown -R $(id -un):$(id -gn) ${{ github.workspace }} | |
Deploy-Go: | |
runs-on: ubuntu-latest | |
needs: [Web-Test] | |
if: github.ref == 'refs/heads/main' | |
defaults: | |
run: | |
working-directory: Web | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Enable corepack | |
run: | | |
corepack enable && | |
corepack install | |
- name: pnpm Build | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
working-directory: Web/packages/go | |
- name: Publish | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
workingDirectory: Web/packages/go | |
packageManager: pnpm | |
- name: Fix permissions of `.wrangler`. See https://github.com/shumbo/Svadilfari/issues/44 | |
run: sudo chown -R $(id -un):$(id -gn) ${{ github.workspace }} |