diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..5f2ab50 --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,25 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - id: label-the-PR + uses: actions/labeler@v5 + + - id: run-frontend-tests + if: contains(steps.label-the-PR.outputs.all-labels, 'frontend') + run: | + echo "Running frontend tests..." + # Put your commands for running frontend tests here + + - id: run-backend-tests + if: contains(steps.label-the-PR.outputs.all-labels, 'backend') + run: | + echo "Running backend tests..." + # Put your commands for running backend tests here diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5407d8f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +name: Deploy to cPanel + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Install Dependencies + run: npm install diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index eb4d9d5..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x, 16.x, 18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test