Skip to content

Instantly share code, notes, and snippets.

@kumarrishav
Forked from bnb/delete-node-modules.yml
Created November 19, 2020 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumarrishav/bbed5e757040ecde4de35022f3779fd7 to your computer and use it in GitHub Desktop.
Save kumarrishav/bbed5e757040ecde4de35022f3779fd7 to your computer and use it in GitHub Desktop.
Delete `node_modules` on push to the default branch
name: Delete node_modules on merge
on:
push:
branches:
- [ $default-branch ]
jobs:
delete-modules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm run pr:delete
{
"name": "some package",
"scripts": {
"pr:delete": "rm -rf ./node_modules"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment