Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exclude specific files from being deleted #377

Open
aman-koco opened this issue Oct 28, 2020 · 0 comments
Open

exclude specific files from being deleted #377

aman-koco opened this issue Oct 28, 2020 · 0 comments

Comments

@aman-koco
Copy link

I am having a problem, whenever my GitHub action executes successfully, the .env file is deleted, and thus my application breaks. Is there a way where we can exclude some files or any other way.

Below is my workflow file -

`

name: KS Backend Beta Deployment
on   
push:
branches:
    - staging
jobs:
   build:
   runs-on: self-hosted

strategy:
  matrix: 
    node-version: [10.16.0]

steps:
  - name: Checkout source code
    uses: actions/checkout@master

  - name: Cache node modules
    uses: actions/cache@v1
    with:
      path: node_modules
      key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
      restore-keys: |
        ${{ runner.OS }}-build-
        ${{ runner.OS }}-
  - name: Install
    run: npm install

  - name: Build
    run: npm run build

  - name: Restart the application
    run: pm2 restart {APP_NAME}

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant