Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robcohen committed Jul 1, 2020
1 parent 2118f92 commit bccfb96
Show file tree
Hide file tree
Showing 42 changed files with 1,246 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/sphinx-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Build Content

on:
push:
branches:
- sphinx-build

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout `sphinx-build` branch
uses: actions/checkout@v2
with:
ref: sphinx-build
path: sphinx-build
- name: Checkout `main` branch
uses: actions/checkout@v2
with:
ref: main
path: main
- run: |
cd sphinx-build
git config --global user.name 'Github-Robot'
git config --global user.email '[email protected]'
export PATH=$PATH:/home/runner/.local/bin
- name: Clone Content repositories
run: |
cd sphinx-build
bash git-clone.sh
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8.3
- name: Install dependencies
run: |
cd sphinx-build
export PATH=$PATH:/home/runner/.local/bin
pip3 install -r requirements.txt
make html
- name: Clear main branch
run: |
cd main
git rm -rf *
cp -r ../sphinx-build/source/* ./
git add .
git commit -am "Update"
git push
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = simpleble
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
17 changes: 17 additions & 0 deletions git-clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Clone cardano-tutorials
git clone --depth=1 --branch "robcohen/docs" https://github.com/input-output-hk/cardano-tutorials.git source/cardano-tutorials
rm -rf source/cardano-tutorials/.git

while read -r name repo; do
git clone --depth=1 --branch "robcohen/docs" "$repo" "git/$name"
if [[ -d "source/cardano-components/$name" ]]
then
rm -rf "source/cardano-components/$name"
fi
mkdir -p "source/cardano-components/$name"
mv "git/$name/doc" "source/cardano-components/$name/"
mv "git/$name/README.md" "source/cardano-components/$name/" || mv "git/$name/README.rst" "source/cardano-components/$name/"
rm -rf git
done < repo-list.txt
4 changes: 4 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build]
publish = "/build/html"
command = """bash git-clone.sh && \
make html"""
Loading

0 comments on commit bccfb96

Please sign in to comment.