llpeterson is publishing document artifacts π #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docs Workflow | |
run-name: ${{ github.actor }} is publishing document artifacts π | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Publish_Docs: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Validate reST source | |
run: make test | |
- name: Build docs | |
run: make html | |
- name: Hack to deal with multiversion | |
run: | | |
mkdir ${{ github.workspace }}/_build/multiversion/ | |
mkdir ${{ github.workspace }}/_build/multiversion/master | |
cp -R ${{ github.workspace }}/_build/html/* ${{ github.workspace }}/_build/multiversion/master | |
ls ${{ github.workspace }}/_build/multiversion/master | |
- name: Prep private key | |
run: | | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" >> ${{ github.workspace }}/id_rsa | |
chmod 600 ${{ github.workspace }}/id_rsa | |
- name: Run rsync script | |
run: | | |
chmod +x ./.github/scripts/rsync.sh | |
./.github/scripts/rsync.sh ${{ secrets.SSH_LOGIN_USERNAME }} ${{ secrets.REMOTE_SERVER_IP }} ${{ secrets.SSH_PORT }} ${{ github.workspace }}/_build/multiversion/master /srv/sites/docs.aetherproject.org ${{ github.workspace }}/id_rsa | |
- run: echo "π This job's status is ${{ job.status }}." |