Surge.sh Teardown
ActionsTags
(1)An GitHub Action to TearDown surge.sh projects that match a regex
Required The regex to match the surge list line.
Example regex:
[2-9] months agoto teardown all projects that have not been touched in the last 2-9 months.
Example lines:
1576772346647 docs.406.nuxt.schul-cloud.surge.sh 8 minutes ago surge surge.sh Standard1576695082855 docs.391.nuxt.schul-cloud.surge.sh 22 hours ago surge surge.sh Standard1576612447133 docs.409.nuxt.schul-cloud.surge.sh 2 days ago surge surge.sh Standard1559388376652 docs.191.nuxt.schul-cloud.surge.sh 7 months ago surge surge.sh Standard
run surge list to list all your currently active projects
If set to true or 1, no changes will be made to your surge account.
Instead the teardown command will be logged to the console.
The env variable SURGE_LOGIN must be defined. This is usually your surge.sh email.
The env variable SURGE_TOKEN must be defined.
You can get your token by running npx surge token in your command line.
uses: adrianjost/actions-surge.sh-teardown
with:
regex: '[2-9]+ months ago'
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}name: Surge Teardown
on:
schedule:
# * is a special character in YAML so you have to quote this string
# run every month
- cron: "0 0 1 * *"
jobs:
surge-teardown:
runs-on: ubuntu-latest
steps:
- name: teardown
uses: adrianjost/actions-surge.sh-teardown
with:
# teardown projects older than 2 months
regex: '[2-9]+ months ago'
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}Please follow the Angular commit message guidelines to create meaningfull release changelogs.
Run: env INPUT_DRYRUN=true node ./index.js for testing. You might have to install the surge package first (npm i -g surge)
Surge.sh Teardown is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.