Add docs archive checkout. #307
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
push: | |
branches: | |
- main | |
- feature/docs_fix | |
- feature/new_docs | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python: [ 3.9.5 ] | |
steps: | |
- name: install pandoc | |
run: | | |
sudo apt-get install pandoc | |
sudo apt-get install --reinstall python3-pkg-resources | |
- uses: actions/setup-python@v2 | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Build and Commit | |
uses: sphinx-notes/pages@v2 | |
with: | |
documentation_path: docs/source | |
requirements_path: docs/docs-requirements.txt | |
- name: checkout v0.3.x archive | |
run: | | |
mkdir ./v0.3.x | |
cd ./v0.3.x | |
git submodule add https://github.com/databrickslabs/mosaic.git v0.3.x/mosaic | |
git checkout gh-pages-v0.3.x | |
git add --all | |
cd ./mosaic | |
git add --all | |
git commit -am "Adding v0.3.x docs" | |
ls -la | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |