-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (34 loc) · 1.58 KB
/
publish-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 }}."