diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..2be11f9f --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,39 @@ + +version: 2 +jobs: + build: + docker: + - image: centos:latest + working_directory: /var/www/ + environment: + BUILD_DIR: /var/www/ + steps: + + # install git + - run: yum update -y && yum install git -y + + # checkout repository + - checkout + + # install git submodules for managing third-party dependencies + - run: git submodule sync && git submodule update --init + + - run: + name: install AWS CLI + command: | + yum makecache + yum -y install epel-release + yum makecache + yum clean all + yum -y install python3-pip + python3 -m pip install --upgrade pip + python3 -m pip install awscli + # Deploy + - deploy: + name: deploy to AWS + command: | + if [ "${CIRCLE_BRANCH}" = "master" ]; then + aws s3 sync $BUILD_DIR s3://hosthtml + else + echo "No master branch" + fi diff --git a/.github/workflows/master_cit-poc-test.yml b/.github/workflows/master_cit-poc-test.yml new file mode 100644 index 00000000..b87cebba --- /dev/null +++ b/.github/workflows/master_cit-poc-test.yml @@ -0,0 +1,60 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy PHP app to Azure Web App - cit-poc-test + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Check if composer.json exists + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: 'composer.json' + + - name: Run composer install if composer.json exists + if: steps.check_files.outputs.files_exists == 'true' + run: composer validate --no-check-publish && composer install --prefer-dist --no-progress + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v2 + with: + name: php-app + path: . + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v2 + with: + name: php-app + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + id: deploy-to-webapp + with: + app-name: 'cit-poc-test' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_0E4627800AAE43CA938E453747BB30F7 }} + package: . diff --git a/content/home.phtml b/content/home.phtml index 6868b921..156b0af5 100644 --- a/content/home.phtml +++ b/content/home.phtml @@ -1,2 +1,2 @@ -
This is home page.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
+This is CIT-POC page.Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).