Skip to content

exclude specific files from being deleted #377

Open
@aman-koco

Description

@aman-koco

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}

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions