lmdbal/.gitea/workflows/main.yml

47 lines
1.5 KiB
YAML

name: Main LMDBAL workfow
run-name: ${{ gitea.actor }} is running LMDBAL main workflow
on:
push:
branches:
- main
jobs:
Archlinux:
runs-on: archlinux
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Make a build directory
run: mkdir build
- name: Configure
working-directory: ./build
run: cmake .. -D BUILD_TESTS=True -D BUILD_DOC=True -D BUILD_DOXYGEN_AWESOME=True -D QT_VERSION_MAJOR=5
- name: Build
working-directory: ./build
run: cmake --build .
- name: Run tests
working-directory: ./build/test
run: ./runUnitTests
- name: Compres Docs
working-directory: ./build/doc
run: tar -cvzf doc.tar.gz man xml html
- name: Copy docs via scp
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.DOMAIN_ROOT }}
username: ${{ secrets.DEPLOY_USER_NAME }}
key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
source: "./build/doc/doc.tar.gz"
target: ${{ secrets.LMDBAL_DOCS_DEPLOY_PATH }}
- name: Unpack the archive
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.DOMAIN_ROOT }}
username: ${{ secrets.DEPLOY_USER_NAME }}
key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
script_stop: true
script: |
cd ${{ secrets.LMDBAL_DOCS_DEPLOY_PATH }}
tar -xvzf doc.tar.gz
rm doc.tar.gz