-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (37 loc) · 916 Bytes
/
Copy pathci.yml
File metadata and controls
50 lines (37 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI/CD TasksAPI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout do repositório
uses: actions/checkout@v4
- name: Configurar Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Dar permissão ao Maven Wrapper
run: chmod +x mvnw
- name: Executar testes
run: ./mvnw clean test
- name: Build da aplicação
run: ./mvnw package -DskipTests
deploy:
name: Deploy no Render
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Acionar Deploy Hook do Render
env:
DEPLOY_HOOK: ${{ secrets.RENDER_DEPLOY_HOOK }}
run: |
curl -X POST "$DEPLOY_HOOK"