mirror of https://github.com/tLDP/LDP
Setting Up Docs Builder via GitHub Actions
This commit is contained in:
parent
f79da4ec95
commit
f270258002
|
@ -1,17 +1,86 @@
|
|||
name: CI
|
||||
name: LDP PR Test Builder
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
env:
|
||||
LDPHOST: 152.19.134.151
|
||||
LDPPORT: 122
|
||||
LDPUSER: builder
|
||||
|
||||
jobs:
|
||||
build:
|
||||
documents-build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run a one-line script
|
||||
run: echo Hello, world!
|
||||
- name: Run a multi-line script
|
||||
|
||||
- name: 🔝 Building System Preparation
|
||||
run: |
|
||||
echo Add other actions to build,
|
||||
echo test, and deploy your project.
|
||||
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
|
||||
id: pythontldp
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/work/python-tldp/deb_dist
|
||||
key: ${{ runner.os }}-pythontldp
|
||||
|
||||
- name: 🧱 Compiling Martins LDP Python Scripts if not Found in Cache
|
||||
if: steps.pythontldp.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd ~/work
|
||||
git clone https://github.com/tLDP/python-tldp
|
||||
cd python-tldp && rm -rf debian
|
||||
python3 setup.py --command-packages=stdeb.command bdist_deb
|
||||
shell: bash
|
||||
|
||||
- name: 🔃 Installation of Martins LDP Python Scripts
|
||||
run: |
|
||||
cd ~/work
|
||||
sudo dpkg -i python-tldp/deb_dist/python3-tldp_*_all.deb
|
||||
ldptool --dump-cfg
|
||||
shell: bash
|
||||
|
||||
- name: 🔀 Restoring SSH Key to Manage Documentation Repository
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/ldpkey
|
||||
chmod 400 ~/.ssh/ldpkey
|
||||
ssh-keyscan -p $LDPPORT -H $LDPHOST >> ~/.ssh/known_hosts
|
||||
shell: bash
|
||||
env:
|
||||
SSH_KEY: ${{secrets.SSHK}}
|
||||
|
||||
- name: ↪️ Restoring Recent Test LDP Docs from Cache if Available
|
||||
id: ldpdocstest
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/work/MAIN
|
||||
key: ${{ runner.os }}-ldpdocstest
|
||||
|
||||
- name: 🔀 Restoring Most Current Test LDP Docs from LDP WWW Server
|
||||
run: |
|
||||
mkdir -p ~/work/MAIN
|
||||
rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i ~/.ssh/ldpkey" $LDPUSER@$LDPHOST:/home/builder/build/test/en/ ~/work/MAIN
|
||||
shell: bash
|
||||
|
||||
- name: 🧱 LDP Documents Processing via Martins scripts
|
||||
run: |
|
||||
ls -alR ~
|
||||
cd ~/work
|
||||
mkdir -p BUILD
|
||||
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
|
||||
shell: bash
|
||||
|
||||
- name: 🔀 Built Documents Transfer for Test Documents WWW Server
|
||||
run:
|
||||
rsync --stats -rvclz --delete-before -e "ssh -p $LDPPORT -i ~/.ssh/ldpkey" ~/work/MAIN/ $LDPUSER@$LDPHOST:/home/builder/build/test/en
|
||||
shell: bash
|
||||
|
||||
# happy end.
|
||||
# ©️ Serge Victor 2020
|
||||
|
|
Loading…
Reference in New Issue