Skip to content

Docgen action

Docgen action #5

Workflow file for this run

name: Docgen action
on:
push:
branches:
- 'main'
paths:
- 'stiller-backend/docs/*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: system deps
run: |
sudo apt install --upgrade -y openssh-client openssh-known-hosts openssh-server
- name: ssh setup
run: |
mkdir -p ~/.ssh/
chmod 700 ~/.ssh/
eval "$(ssh-agent -s)"
echo "${{ secrets.SSH_PRIVKEY }}" | tr -d '\r' > ~/.ssh/id_rsa
echo "${{ secrets.SSH_PUBKEY }}" | tr -d '\r' > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
ssh-add -vvv
ls ~/.ssh/
ssh-keyscan -H "${{ secrets.SSH_IP }}" >> ~/.ssh/known_hosts
- name: build
run: ssh -vT "bauer@${{ secrets.SSH_IP }}" "cd ~/clones/metagallery/stiller-backend/docs && mdbook build"
- name: deploy
run: ssh -vT "bauer@${{ secrets.SSH_IP }}" "echo ${{ secrets.SUDO_PWD }} | sudo -S cp -r ~/clones/metagallery/stiller-backend/docs/book /var/www/stillerdocs && sudo chown --recursive www-data /var/www/stillerdocs"