Skip to content

build(deps): bump the effect-minor-patch group across 1 directory with 7 updates #305

build(deps): bump the effect-minor-patch group across 1 directory with 7 updates

build(deps): bump the effect-minor-patch group across 1 directory with 7 updates #305

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize, closed]
permissions:
contents: read
pull-requests: write
concurrency:
group: deploy-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
env:
ALCHEMY_STAGE: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || (github.ref == 'refs/heads/main' && 'prod' || github.ref_name) }}
jobs:
deploy:
name: deploy
if: ${{ github.event.action != 'closed' && !github.event.repository.is_template && vars.ALCHEMY_DEPLOY == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
extra-substituters = https://nix.systemfsoftware.com
extra-trusted-public-keys = nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=
- name: Lift the ubuntu-24.04 AppArmor block on user namespaces
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Create the sandbox's output directory
run: mkdir -p .cache
- name: Install through the sandbox, offline from the Nix pnpm store
run: nix develop --command pnpm bootstrap
- name: Check provider environment
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: nix develop --command pnpm run check-env
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SITE_DOMAIN: ${{ github.ref == 'refs/heads/main' && vars.SITE_DOMAIN || '' }}
ALCHEMY_GITHUB_TOKEN: ${{ github.token }}
PULL_REQUEST: ${{ github.event.number }}
GITHUB_SHA: ${{ github.sha }}
run: nix develop --command pnpm run deploy
cleanup:
name: cleanup
if: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' && !github.event.repository.is_template && vars.ALCHEMY_DEPLOY == 'true' && github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
extra-substituters = https://nix.systemfsoftware.com
extra-trusted-public-keys = nix-cache-1:wXA8I4DayNW9q6enUyQA/P/nT38pGSTLt374t3gsn7M=
- name: Lift the ubuntu-24.04 AppArmor block on user namespaces
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Create the sandbox's output directory
run: mkdir -p .cache
- name: Install through the sandbox, offline from the Nix pnpm store
run: nix develop --command pnpm bootstrap
- name: Safety check
run: |
if [ "$ALCHEMY_STAGE" = "prod" ]; then
echo "refusing to destroy the prod stage" >&2
exit 1
fi
- name: Destroy preview
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
ALCHEMY_GITHUB_TOKEN: ${{ github.token }}
PULL_REQUEST: ${{ github.event.number }}
GITHUB_SHA: ${{ github.sha }}
run: nix develop --command pnpm run destroy