Setup GitLab CI. Your configuration file will look something like this
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
image: applicazza/ionic:latest stages: - deploy cache: untracked: true key: "$CI_PROJECT_ID" paths: - node_modules/ build_android: stage: deploy only: - master script: - ls - npm i - ionic cordova platform rm android - ionic cordova platform add android - ionic cordova build android - ls ./platforms/android/build/outputs/apk/android*.apk artifacts: paths: - platforms/android/build/outputs/apk/ |
Optionally put a link to file in your README.md that will look like
https://gitlab.com/YOUR_ORGANIZATION_NAME/YOUR_PROJECT_NAME/builds/artifacts/master/raw/platforms/android/build/outputs/apk/android-debug.apk?job=build_android
Hi,
Thank you very much!
Is jt possible that you share your docker file?
Sure, I’ve shared it in this repository on GitHub.
Can I deploy ionic app to gitlab page? i have copied www folder to public but it doesnt work.
will this work? and then access it to my username.gitlab.io/projectname? I have try it but does not work.
build_android:
stage: deploy
only:
– master
script:
– npm i
– ionic build –prod
– ls ./www
– mkdir ./public
– mv ./www ./public
– ls ./public
artifacts:
paths:
– public
My ionic build passes, but Gradle daemon keeps closing… anyway to debug this?