diff --git a/.github/workflows/PushFeaturePullDevMainWorkflow.yml b/.github/workflows/PushFeaturePullDevMainWorkflow.yml new file mode 100644 index 0000000..9f54a89 --- /dev/null +++ b/.github/workflows/PushFeaturePullDevMainWorkflow.yml @@ -0,0 +1,38 @@ +on: + push: + branches: + - feature + pull_request: + branches: + - main + - develop + +env: + NODE_VERSION: '16.x' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Run Tests + run: npm test + + - name: Upload artifact for deployment + uses: actions/upload-artifact@v2 + with: + name: node-app + path: . diff --git a/.github/workflows/fromfeaturetodevelop.yml b/.github/workflows/fromfeaturetodevelop.yml deleted file mode 100644 index 6de0683..0000000 --- a/.github/workflows/fromfeaturetodevelop.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Feature to Develop - -on: - push: - branches: - - feature - -jobs: - build-and-test: - runs-on: ubuntu-latest # You can change the runner environment if needed - - steps: - - name: Checkout code - uses: actions/checkout@v2 # This step checks out your repository's code - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '16' - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build --if-present - - - name: Run tests - run: npm run test --if-present - - - name: Push to develop - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: develop diff --git a/.github/workflows/main_l5-m3-2.yml b/.github/workflows/main_l5-m3-2.yml index cb94031..3ccc810 100644 --- a/.github/workflows/main_l5-m3-2.yml +++ b/.github/workflows/main_l5-m3-2.yml @@ -1,7 +1,7 @@ # 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 Node.js app to Azure Web App - L5-M3-2 +name: Build and deploy to Azure Webapp - L5-M3-2 on: push: