Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Reorganize the documents to adapt website building #448

Merged
merged 19 commits into from
Apr 11, 2024
Merged
82 changes: 38 additions & 44 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,65 +24,59 @@ on:
pull_request:
branches:
- main
paths:
- 'docs/**'
- 'cpp/**'
- 'java/**'
- 'spark/**'
- 'pyspark/**'
- '.github/workflows/docs.yml'

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
build-website:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/setup-node@v3
with:
node-version: 16

- name: Checkout Code
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true
fetch-depth: 0

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Install Python
uses: actions/setup-python@v4
- uses: actions/setup-node@v4
with:
python-version: 3.9
node-version: '18'

- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ca-certificates doxygen
curl -sSL https://install.python-poetry.org | python3 -
# install poetry
yes | sudo python3 -m pip install poetry --quiet
poetry env use python3
# install dependencies with poetry
poetry install --with=docs,spark
working-directory: ./pyspark
- name: Checkout website
uses: actions/checkout@v4
with:
repository: apache/incubator-graphar-website
path: website
ref: main

- name: Generate Doc
- name: Sync docs to website
working-directory: ${{ github.workspace }}
run: |
export JAVA_HOME=${JAVA_HOME_11_X64}
make html
working-directory: ./docs
# Note: DO NOT omit the trailing slash in the source directory
rsync -av docs/ website/docs

- name: Install Dependencies
working-directory: website
run: pnpm install --frozen-lockfile

- name: Commit Doc
# TODO: open this when apache infrastructure is ready
# if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'apache/incubator-graphar' }}
if: false
run: |
git config user.email github-actions@github.com
git config user.name github-actions
git branch -D gh-pages || true
git checkout --orphan gh-pages
shopt -s extglob
rm -rf !(docs)
rm -rf .github .clang-format .gitattributes .gitmodules .gitignore
mv docs/_build/html/* ./
mv docs/_build/html/.nojekyll ./
rm -rf docs
git add -A
git commit -m "Generate latest docs on CI, from commit ${{ github.sha }}."
git push -f origin gh-pages
- name: Build
working-directory: website
run: pnpm build

# TODO: enable markdownlint & typos
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ concurrency:
cancel-in-progress: true

jobs:
build:
check:
runs-on: ubuntu-latest
steps:

Expand Down
1 change: 0 additions & 1 deletion docs/.gitignore

This file was deleted.

Empty file removed docs/.nojekyll
Empty file.
62 changes: 0 additions & 62 deletions docs/Makefile

This file was deleted.

10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Apache GraphAr Documentation

This directory contains the source files for building the main
project documentation for Apache GraphAr (incubating). This include
the GraphAr Format specification and libraries.

Instructions for building the documentation site are found in the
[website README][1].

[1]: https://github.com/apache/incubator-graphar-website/blob/main/README.md
6 changes: 0 additions & 6 deletions docs/_static/css/brands.min.css

This file was deleted.

18 changes: 0 additions & 18 deletions docs/_static/css/custom.css

This file was deleted.

147 changes: 0 additions & 147 deletions docs/_static/css/panels.css

This file was deleted.

6 changes: 0 additions & 6 deletions docs/_static/css/v4-shims.min.css

This file was deleted.

Binary file removed docs/_static/webfonts/fa-brands-400.ttf
Binary file not shown.
Binary file removed docs/_static/webfonts/fa-brands-400.woff2
Binary file not shown.
7 changes: 0 additions & 7 deletions docs/_templates/base.html

This file was deleted.

Loading
Loading