Skip to content

Instantly share code, notes, and snippets.

@bnb
Last active November 19, 2020 21:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bnb/490964c6f57a7ae141611d47bc2de054 to your computer and use it in GitHub Desktop.
Save bnb/490964c6f57a7ae141611d47bc2de054 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