title: Github Action - AWS CodeDeploy Succeeded but in EC2 created the modified file
body: <p>i'm setting up the Github Action, AWS EC2, CodeDeploy. All the configuration seems working well. But excepts one thing. I can not understand and how can i solve it. If someone have experiences about this please help me.</p>
  <p>I'm using:</p>
  <ul>
  <li><p>EC2 Rhel 8</p>
  </li>
  <li><p>Node project (VueJs framework)</p>
  </li>
  </ul>
  <p>This is my cicd.yml file</p>
  <pre><code>on:
    push:
      branches:
      - paymentV2
      
  name: Deploy VueJS to Amazon ECS
  #on: [push]
  
  jobs:
    deploy:
      name: Deploy
      runs-on: ubuntu-latest
      strategy:
        matrix:
          node-version: ['12.x']
          appname: ['staging-aws-codedeploy']
          deploy-group: ['staging']
          repo: ['project/MyProject']
  
      steps:
        - uses: actions/checkout@v2
  
        # Configure AWS credentials
        - name: Configure AWS credentials
          uses: aws-actions/configure-aws-credentials@v1
          with:
            aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
            aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
            aws-region: ap-southeast-1
  
        # Deploy to AWS
        - name: Deploy to AWS
          run: |
            aws deploy create-deployment \
            --application-name ${{ matrix.appname }} \
            --deployment-config-name CodeDeployDefault.OneAtATime \
            --deployment-group-name ${{ matrix.deploy-group }} \
            --file-exists-behavior OVERWRITE \
            --description &quot;GitHub Deployment for the ${{ matrix.appname }}-${{ github.sha }}&quot; \
            --github-location repository=${{ matrix.repo }},commitId=${{ github.sha }}
  </code></pre>
  <p>This is my appspec.yml</p>
  <pre><code>version: 0.0
  os: linux
  files:
    - source: /
      destination: /var/www/MyProject
  hooks:
    ApplicationStart:
      - location: scripts/application_start.sh
        timeout: 300
        runas: root
    #scripts/application_start.sh
    #cd /var/www/MyProject
    #npm run build
  </code></pre>
  <p>This is the log from Github action &amp; CodeDeploy AWS</p>
  <p><a href="https://i.stack.imgur.com/kOAyy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kOAyy.png" alt="enter image description here" /></a></p>
  <p>I've tried editing the <strong>Vision.vue</strong> file and created the pull request on Github. Everything was working well. But one thing i'm confusing is why the modified file is existed. Please refer the image below</p>
  <p><a href="https://i.stack.imgur.com/Ytrzg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ytrzg.png" alt="enter image description here" /></a></p>
  <p>=&gt; What am i expected is the modified file shouldn't have existed. I thought that Github should be automatically run <strong>git pull</strong> to get all new source code.
  I've some more research and found out --file-exists-behavior with OVERWRITE but it seems not working as i want.
  <a href="https://docs.aws.amazon.com/cli/latest/reference/deploy/create-deployment.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/cli/latest/reference/deploy/create-deployment.html</a></p>
  <p>==&gt; Once again, i have no experience about CD by Github action &amp; CodeDeploy. Everyone please help me and advice me the right thing. Thank you so much.</p>