Skip to content

Purge old domains

Purge old domains #559

Workflow file for this run

name: Purge old domains
on:
workflow_dispatch:
inputs:
days:
description: 'Older than (days)'
required: false
schedule:
- cron: '0 3 * * *'
jobs:
surge-purge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install surge
run: npm -g install surge
- name: Teardown old domains
run: npx zx scripts/purge_expired_domains.mjs --olderThan ${{ github.event.inputs.days || '10' }}
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}