Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Build on branch MARP-59-Migrate-the-Marketplace-from-Ivyteam-Jenkins-to-Github triggered by tutn-axonivy #106

Build on branch MARP-59-Migrate-the-Marketplace-from-Ivyteam-Jenkins-to-Github triggered by tutn-axonivy

Build on branch MARP-59-Migrate-the-Marketplace-from-Ivyteam-Jenkins-to-Github triggered by tutn-axonivy #106

Workflow file for this run

name: CI Build
run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}}
on:
push:
branches:
- MARP-59-Migrate-the-Marketplace-from-Ivyteam-Jenkins-to-Github
workflow_dispatch:
env:
DIST_FILE: ivy-website-market.tar
jobs:
build:
runs-on: ["marketplace.axonivy.com"]
steps:
- uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
extensions: |
gd
zip
- name: Composer install
shell: sh
run: |
composer install --no-dev --no-progress
tar -cf ${{ env.DIST_FILE }} --exclude=src/web/_market --exclude=src/web/market-cache src vendor
- name: Archive build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.DIST_FILE }}
path: |
${{ env.DIST_FILE }}
# run-test:
# needs: build
# runs-on: ["marketplace.axonivy.com"]
# steps:
# - name: Run test
# shell: sh
# run: |
# composer install --no-progress
# ./vendor/bin/phpunit --log-junit phpunit-junit.xml
# - name: Public test report
# uses: mikepenz/action-junit-report@v4
# if: success()
# with:
# report_paths: "**/phpunit-junit.xml"
check-editorconfig:
# needs: run-test
runs-on: ["marketplace.axonivy.com"]
steps:
- name: Editor checker
uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker
deploy:
needs: check-editorconfig
runs-on: ["marketplace.axonivy.com"]
if: ${{github.ref_name}} == 'MARP-59-Migrate-the-Marketplace-from-Ivyteam-Jenkins-to-Github'
steps:
- name: Deploy
shell: sh
run: |
repoCheckOutFolder="/home/nttu/actions-runner/workspace/market.axonivy.com/market.axonivy.com"
targetFolder="/home/axonivy/deployment/ivy-website-market"
rm -rf $targetFolder/*
cp -r $repoCheckOutFolder/src $repoCheckOutFolder/vendor $targetFolder
ln -fns /home/axonivya/data/market $targetFolder/src/web/_market
ln -fns /home/axonivya/data/market-cache $targetFolder/src/web/market-cache
ln -fns $targetFolder/src/web /var/www/market.axonivy-dev.com