-
Notifications
You must be signed in to change notification settings - Fork 3
30 lines (28 loc) · 1.33 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
name: Publish Docs Workflow
run-name: ${{ github.actor }} is publishing document artifacts 🚀
on: [push, workflow_dispatch]
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 multiversion
- name: List built files
run: |
ls ${{ github.workspace }}/_build/multiversion/*
- 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 }}."