Test & Optimize The New Workflow

Learn how to test and optimize the workflow for your web application.

Testing the new workflow

The current workflow only executes for pull requests merged into the master branch. In order to test the workflow without merging the pull request, let’s temporarily also execute the workflow for any push to the current branch, e.g. add-deployment-github-action (our current branch).

In the .github/workflows/services-web-deploy.yml file, update the “on” configuration using nano to match the following:

Nano editor instructions:

  • Ctrl+o and then press Enter to save.
  • Ctrl+x to exit.
on: # start of 'on' event configuration
  push: # start of on 'push' event definition
    branches: # definition of branches to monitor for 'push' event
      - master
      - add-deployment-github-action

With that temporary configuration in place, commit and push the changes.

git add .

git commit -m "push to test the workflow"

git push

Get hands-on with 1200+ tech skills courses.