This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
Pos restaurant #960
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Plugin pos UI CI | |
on: | |
push: | |
branches: | |
- dev | |
- staging | |
- build-test | |
paths: | |
- "packages/erxes-ui/**" | |
- "packages/ui-plugin-template/**" | |
- "packages/ui-cards/**" | |
- "packages/ui-forms/**" | |
- "packages/ui-inbox/**" | |
- "packages/ui-knowledgebase/**" | |
- "packages/ui-leads/**" | |
- "packages/ui-log/**" | |
- "packages/ui-notifications/**" | |
- "packages/ui-products/**" | |
- "packages/ui-segments/**" | |
- "packages/ui-settings/**" | |
- "packages/ui-team/**" | |
- "packages/ui-tags/**" | |
- "packages/ui-pos/**" | |
- "packages/plugin-pos-ui/**" | |
- ".github/workflows/plugin-pos-ui.yaml" | |
pull_request: | |
branches: | |
- dev | |
- staging | |
- build-test | |
paths: | |
- "packages/erxes-ui/**" | |
- "packages/ui-plugin-template/**" | |
- "packages/ui-cards/**" | |
- "packages/ui-forms/**" | |
- "packages/ui-inbox/**" | |
- "packages/ui-knowledgebase/**" | |
- "packages/ui-leads/**" | |
- "packages/ui-log/**" | |
- "packages/ui-notifications/**" | |
- "packages/ui-products/**" | |
- "packages/ui-segments/**" | |
- "packages/ui-settings/**" | |
- "packages/ui-team/**" | |
- "packages/ui-tags/**" | |
- "packages/ui-pos/**" | |
- "packages/plugin-pos-ui/**" | |
- ".github/workflows/plugin-pos-ui.yaml" | |
jobs: | |
ui: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.17.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17.x | |
- name: Build | |
run: | | |
yarn install --frozen-lockfile | |
cp -r packages/ui-plugin-template/.erxes packages/plugin-pos-ui/.erxes | |
cp -r packages/plugin-pos-ui/src packages/plugin-pos-ui/.erxes/plugin-src | |
cd packages/plugin-pos-ui | |
yarn install | |
yarn install-deps | |
yarn build | |
- name: Configure AWS credentials | |
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') | |
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: us-west-2 | |
- name: Deploy | |
if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') | |
run: | | |
tar -cf build.tar --directory=packages/plugin-pos-ui/.erxes/dist . | |
cp build.tar packages/plugin-pos-ui/.erxes/dist | |
rm -rf packages/plugin-pos-ui/.erxes/dist/*.js | |
aws s3 sync packages/plugin-pos-ui/.erxes/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-pos-ui --delete |