2020-01-31 02:33:25 +00:00
|
|
|
name: LDP Master Builder
|
2020-01-30 03:37:52 +00:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
2020-01-30 10:06:16 +00:00
|
|
|
env:
|
2020-08-23 04:43:32 +00:00
|
|
|
LDPHOST1: 152.19.134.151
|
|
|
|
LDPHOST2: 152.19.134.152
|
|
|
|
LDPPORT: 722
|
2020-01-30 10:06:16 +00:00
|
|
|
LDPUSER: builder
|
|
|
|
|
2020-01-30 03:37:52 +00:00
|
|
|
jobs:
|
2020-01-31 02:33:25 +00:00
|
|
|
documents-build:
|
2020-01-30 03:37:52 +00:00
|
|
|
|
2022-07-24 09:04:19 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2020-01-30 03:37:52 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-01-30 10:06:16 +00:00
|
|
|
|
|
|
|
- name: 🔝 Building System Preparation
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt -y install texlive-font-utils linuxdoc-tools-text linuxdoc-tools-latex docbook-dsssl docbook-xsl docbook-utils htmldoc htmldoc-common docbook-xsl html2text docbook5-xml docbook-xsl-ns jing asciidoc libxml2-utils python3-stdeb fakeroot python3-all python3-networkx python3-nose fop ldp-docbook-xsl ldp-docbook-dsssl docbook opensp dh-python
|
|
|
|
shell: bash
|
|
|
|
|
2020-08-23 04:43:32 +00:00
|
|
|
- name: ↪️ Restoring Martin's LDP Python Scripts from Cache
|
2020-01-31 02:33:25 +00:00
|
|
|
id: pythontldp
|
2020-01-30 10:06:16 +00:00
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
2020-01-31 02:08:26 +00:00
|
|
|
path: ~/work/python-tldp/deb_dist
|
2020-01-31 02:33:25 +00:00
|
|
|
key: ${{ runner.os }}-pythontldp
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-08-23 04:43:32 +00:00
|
|
|
- name: 🧱 Compiling Martin's LDP Python Scripts if not Found in Cache
|
2020-01-31 02:33:25 +00:00
|
|
|
if: steps.pythontldp.outputs.cache-hit != 'true'
|
2020-01-30 03:37:52 +00:00
|
|
|
run: |
|
2020-01-30 11:33:16 +00:00
|
|
|
cd ~/work
|
2020-01-30 03:37:52 +00:00
|
|
|
git clone https://github.com/tLDP/python-tldp
|
|
|
|
cd python-tldp && rm -rf debian
|
|
|
|
python3 setup.py --command-packages=stdeb.command bdist_deb
|
2020-01-30 10:06:16 +00:00
|
|
|
shell: bash
|
|
|
|
|
2020-08-23 04:43:32 +00:00
|
|
|
- name: 🔃 Installation of Martin's LDP Python Scripts
|
2020-01-30 10:10:13 +00:00
|
|
|
run: |
|
2020-01-30 11:33:16 +00:00
|
|
|
cd ~/work
|
2020-01-30 11:25:10 +00:00
|
|
|
sudo dpkg -i python-tldp/deb_dist/python3-tldp_*_all.deb
|
2020-01-30 10:10:13 +00:00
|
|
|
ldptool --dump-cfg
|
|
|
|
shell: bash
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 11:33:16 +00:00
|
|
|
- name: 🔀 Restoring SSH Key to Manage Documentation Repository
|
2020-01-30 10:10:13 +00:00
|
|
|
run: |
|
2020-08-23 04:43:32 +00:00
|
|
|
mkdir -p /home/runner/.ssh
|
|
|
|
chmod 700 /home/runner/.ssh
|
|
|
|
echo "$SSH_KEY" > /home/runner/.ssh/ldpkey
|
|
|
|
chmod 400 /home/runner/.ssh/ldpkey
|
|
|
|
ssh-keyscan -p $LDPPORT -H $LDPHOST1 >> /home/runner/.ssh/known_hosts
|
|
|
|
ssh-keyscan -p $LDPPORT -H $LDPHOST2 >> /home/runner/.ssh/known_hosts
|
|
|
|
ssh -vv -p $LDPPORT -i /home/runner/.ssh/ldpkey $LDPUSER@$LDPHOST1 ls
|
|
|
|
ssh -vv -p $LDPPORT -i /home/runner/.ssh/ldpkey $LDPUSER@$LDPHOST2 ls
|
2020-01-30 10:10:13 +00:00
|
|
|
shell: bash
|
|
|
|
env:
|
2020-08-23 04:43:32 +00:00
|
|
|
SSH_KEY: ${{secrets.SSHKEY}}
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 15:10:41 +00:00
|
|
|
- name: ↪️ Restoring Recent Production (Master Branch) LDP Docs from Cache if Available
|
2020-01-31 02:33:25 +00:00
|
|
|
id: ldpdocsmain
|
2020-01-30 15:10:41 +00:00
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
2020-01-31 02:08:26 +00:00
|
|
|
path: ~/work/MAIN
|
2020-01-31 02:33:25 +00:00
|
|
|
key: ${{ runner.os }}-ldpdocsmain
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 15:10:41 +00:00
|
|
|
- name: 🔀 Restoring Most Current Production (Master Branch) LDP Docs from LDP WWW Server
|
|
|
|
run: |
|
2020-01-31 02:08:26 +00:00
|
|
|
mkdir -p ~/work/MAIN
|
2020-08-23 04:43:32 +00:00
|
|
|
rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i /home/runner/.ssh/ldpkey" $LDPUSER@$LDPHOST1:/home/builder/en/ ~/work/MAIN
|
2020-01-30 15:10:41 +00:00
|
|
|
shell: bash
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 10:11:16 +00:00
|
|
|
- name: 🧱 LDP Documents Processing via Martins scripts
|
2020-01-30 11:53:00 +00:00
|
|
|
run: |
|
2020-01-31 02:33:25 +00:00
|
|
|
ls -alR ~
|
2020-01-30 11:34:41 +00:00
|
|
|
cd ~/work
|
2020-01-30 12:16:49 +00:00
|
|
|
mkdir -p BUILD
|
2020-01-30 12:50:43 +00:00
|
|
|
ldptool --loglevel info --builddir BUILD --configfile LDP/LDP/.github/builder.ldptool.cfg --pubdir MAIN --list
|
|
|
|
ldptool --loglevel info --builddir BUILD --configfile LDP/LDP/.github/builder.ldptool.cfg --pubdir MAIN --publish
|
2020-01-30 10:10:13 +00:00
|
|
|
shell: bash
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-08-23 04:43:32 +00:00
|
|
|
- name: 🔀 Built Documents Transfer for Master Main Documents WWW Front Servers @ Ibiblio
|
|
|
|
run: |
|
|
|
|
rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i /home/runner/.ssh/ldpkey" ~/work/MAIN/ $LDPUSER@$LDPHOST1:/home/builder/en
|
|
|
|
rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i /home/runner/.ssh/ldpkey" ~/work/MAIN/ $LDPUSER@$LDPHOST2:/home/builder/en
|
2020-01-31 02:33:25 +00:00
|
|
|
shell: bash
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 03:37:52 +00:00
|
|
|
# happy end.
|
2020-01-31 02:45:05 +00:00
|
|
|
# ©️ Serge Victor 2020
|