2020-01-30 10:06:16 +00:00
|
|
|
name: LDP Builder
|
2020-01-30 03:37:52 +00:00
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
2020-01-30 10:06:16 +00:00
|
|
|
env:
|
|
|
|
LDPHOST: 152.19.134.151
|
|
|
|
LDPPORT: 122
|
|
|
|
LDPUSER: builder
|
|
|
|
|
2020-01-30 03:37:52 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
- name: Restoring Martins LDP Python Scripts from Cache
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: python-tldp/deb_dist
|
|
|
|
key: python-tldp
|
|
|
|
|
|
|
|
- name: 🧱 Compiling Martins LDP Python Scripts if not Found in Cache
|
|
|
|
if: steps.python-tldp.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-01-30 10:10:13 +00:00
|
|
|
- name: Installation of Martins LDP Python Scripts
|
|
|
|
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-01-30 11:39:59 +00:00
|
|
|
mkdir -p ~/.ssh
|
2020-01-30 11:46:49 +00:00
|
|
|
chmod 700 ~/.ssh
|
2020-01-30 10:10:13 +00:00
|
|
|
echo "$SSH_KEY" > ~/.ssh/ldpkey
|
2020-01-30 11:46:49 +00:00
|
|
|
chmod 400 ~/.ssh/ldpkey
|
2020-01-30 10:10:13 +00:00
|
|
|
ssh-keyscan -p $LDPPORT -H $LDPHOST >> ~/.ssh/known_hosts
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
SSH_KEY: ${{secrets.SSHK}}
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 10:10:13 +00:00
|
|
|
# - name: Restoring Production (Master Branch) LDP Docs from Cache
|
|
|
|
# uses: actions/cache@v1
|
|
|
|
# with:
|
|
|
|
# path: MAIN
|
|
|
|
# key: ldpdocs-main
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 12:16:49 +00:00
|
|
|
# - name: 🔀 Restoring Production (Master Branch) LDP Docs from LDP WWW Server
|
|
|
|
# run: |
|
|
|
|
# cd ~/work
|
|
|
|
# mkdir -p MAIN
|
|
|
|
# mkdir -p TMP
|
|
|
|
# rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i ~/.ssh/ldpkey" $LDPUSER@$LDPHOST:/home/builder/build/en/ TMP/en
|
|
|
|
# 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-30 11:34:41 +00:00
|
|
|
cd ~/work
|
2020-01-30 12:16:49 +00:00
|
|
|
mkdir -p BUILD
|
|
|
|
mkdir -p MAIN
|
2020-01-30 10:10:13 +00:00
|
|
|
ls -alR
|
2020-01-30 11:34:41 +00:00
|
|
|
ldptool --loglevel info --builddir BUILD --configfile LDP/.github/builder.ldptool.cfg --pubdir MAIN --list
|
|
|
|
ldptool --loglevel info --builddir BUILD --configfile 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-01-30 10:10:13 +00:00
|
|
|
# - name: 🔀 Built Documents Transfer for Master
|
|
|
|
# run:
|
|
|
|
# rsync --stats -rvclz --delete-before -e 'ssh -p $LDPPORT -i ~/.ssh/ldpkey' MAIN/en/ $LDPUSER@$LDPHOST:/home/builder/build/en
|
|
|
|
# shell: bash
|
2020-01-30 10:06:16 +00:00
|
|
|
|
2020-01-30 03:37:52 +00:00
|
|
|
# happy end.
|