Skip to content

Commit

Permalink
docs: Add upload to GitHub actions
Browse files Browse the repository at this point in the history
Split off the docs building only on push

Signed-off-by: Andrej Rode <[email protected]>
  • Loading branch information
noc0lour committed Feb 4, 2024
1 parent 16e6a87 commit 8fdee43
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 17 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish docs

on: [push]
jobs:
build-docs:
name: Build VOLK docs
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Install dependencies
run: sudo apt install python3-mako liborc-dev doxygen
- name: Configure
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EXECUTABLE=ON ..
- name: Build
run: cmake --build build --target volk_doc
- name: Setup SSH Keys
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_KEY }}"
mkdir $HOME/.ssh
echo -n "${{ secrets.SSH_KNOWN_HOST }}" > $HOME/.ssh/known_hosts
- name: Upload via SSH
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: 'tar -cz build/html/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_SERVER }} "mkdir -p /www/$(date +%Y.%m.%d); cd /www/$(date +%Y.%m.%d); tar --strip-components=1 -xz; rm /www/live; cd /www; ln -sf $(date +%Y.%m.%d) live;"'
- uses: actions/upload-artifact@v4
with:
name: volk_docs
path: build/html/
19 changes: 2 additions & 17 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,7 @@ jobs:
- name: test
run: cd build && ctest -V

build-docs:
name: Build VOLK docs
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
submodules: 'recursive'
- name: Install dependencies
run: sudo apt install python3-mako liborc-dev doxygen
- name: Configure
run: mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-Werror" -DBUILD_EXECUTABLE=ON ..
- name: Build
run: cmake --build build --target volk_doc
- uses: actions/upload-artifact@v4
with:
name: volk_docs
path: build/html/

build-windows:

Expand Down Expand Up @@ -282,3 +265,5 @@ jobs:
# ./build/apps/volk-config-info --cc
- name: test
run: cd build && ctest -V


0 comments on commit 8fdee43

Please sign in to comment.