title: CI CD ionic Project . Configuring gitlab-ci.yml?
body: <p>I want to configure a gitlab-ci.yml file for an ionic projects and still confusing .</p>
  <ul>
  <li>what's the main stages for every projects for the CI CD configuration?</li>
  <li>difference between the build and the deploy stages?</li>
  <li>how can implement a build stage for ionic project?</li>
  </ul>
  <p>this is my try for the gitlab-ci.yml in my project:</p>
  <pre><code>stages:
    - test
    - deploy
  
  build_web:
    image: node:latest
    stage: test 
    only:
        - main
    script:
      - npm install
      - npm run lint
      - npm run test
      - npm run build
      - npm run e2e
      - npm run deploy
  
  build_ios:
    stage: deploy
    only:
      - release 
    script:
      - ./ionic-login.sh
      - ls
      - npm run ios:release:ci
      - ./ionic-package-ios.sh
  
  build_android:
    stage: deploy
    only:
      - release
    script:
      - ls
      - npm run android:release
      - ls ./platforms/android/build/outputs/apk/android*.apk
    artifacts:
      paths:
        - platforms/android/build/outputs/apk/
  </code></pre>