Skip to content

Add po token and visitor data #43

Add po token and visitor data

Add po token and visitor data #43

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ "release" ]
pull_request:
branches: [ "release" ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- name: Get version number
id: get_version
run: |
VER=$(cat VERSION)
echo "version=$VER" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
name: RELEASE-${{ env.version }}
tag_name: ${{ env.version }}
files: build/libs/wheelbarrow-bot-${{ env.version }}.jar
- name: Deploy to remote VPS
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSH_KEY }}
source: build/libs/wheelbarrow-bot-${{ env.version }}.jar
target: ${{ secrets.DEPLOYMENT_PATH }}
- name: Restart service
uses: appleboy/ssh-action@v0.1.8
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSH_KEY }}
script: |
cd wheelbarrow-v2
. ./deploy.sh wheelbarrow-bot-${{ env.version }}.jar