Skip to content

Instantly share code, notes, and snippets.

@maxisandoval37
Last active January 4, 2024 19:52
Show Gist options
  • Save maxisandoval37/99e2c0621b002c041c56e7bf109cf8ea to your computer and use it in GitHub Desktop.
Save maxisandoval37/99e2c0621b002c041c56e7bf109cf8ea to your computer and use it in GitHub Desktop.
Build and Test Maven - Github Action Example
name: Build and Test
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up JDK 18
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '18'
- name: Build and Test
run: mvn clean install test
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TOKEN_APP }}
publish_dir: ./target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment