Skip to content

chore: create deployment workflow #1

chore: create deployment workflow

chore: create deployment workflow #1

Workflow file for this run

name: CD - Deploy on Tags
on:
push:
tags:
- '*.*.*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build application JAR
uses: ./gradlew --no-daemon bootJar
- name: Deploy to server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
server-dir: ${{ env.FTP_DIR }}
local-dir: ./deploy/