Creating a CI workflow or pipeline
In this section, we will automate the deployment of our full-stack application by using a workflow in GitHub Actions. Follow these steps:
- Go to the GitHub repository of your project, then click on the Actions tab. Search for
Publish Java Package
and pick the Maven workflow:
Figure 17.10 – Selecting a workflow
Figure 17.10 shows the basic and ready-made Maven workflow for building Maven projects.
- Change the content of the YAML file in the editor by replacing it with the following YAML configuration:
name: CICD
on:
push:
branches:
- master
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
&...