42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: 'Publish Documents'
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
branch:
|
|
description: 'Ветка'
|
|
required: true
|
|
type: string
|
|
default: master
|
|
jobs:
|
|
deploy-dev:
|
|
name: 'Deploy to dev'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 'Print Info'
|
|
run: |
|
|
echo "Branch: ${{ github.event.inputs.branch }}"
|
|
- name: Cloning
|
|
uses: https://git.binom.pw/otp/devops/clone@main
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
repository: 'devspc/docs'
|
|
branch: ${{ github.event.inputs.branch }}
|
|
- name: Setup Jvm
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 21
|
|
distribution: "adopt"
|
|
- name: Downloading generator
|
|
run: |
|
|
curl http://nexus.xx/repository/jars/confluence-publisher.jar > confluence-publisher.jar
|
|
- name: Publishing
|
|
run: |
|
|
java -jar confluence-publisher.jar --confluence-url http://192.168.76.136 --token '${{ secrets.CONFLUENCE_TOKEN }}' -f **/*.md
|
|
- name: 'Cleanup'
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
echo 'Cleaning...'
|
|
rm -rf ~/.gradle/init.gradle.kts
|
|
rm -rf ~/.ssh/config
|
|
rm -rf ~/.ssh/my_key |