From 13c64b24f85efff2d6c5d7c05baaf921d2afff71 Mon Sep 17 00:00:00 2001 From: Peter Jun Park Date: Tue, 30 Jul 2024 15:28:53 -0400 Subject: [PATCH] update archived docs workflow Signed-off-by: Peter Jun Park move files update archived docs workflow Signed-off-by: Peter Jun Park fix version number clean up workflow workflow test workflow test another workflow test --- .github/workflows/docs.yml | 17 ++++++++--------- docs/archive/docs-2.x/Makefile | 4 ++-- docs/archive/docs-2.x/VERSION | 1 + docs/archive/docs-2.x/conf.py | 4 ++-- .../archive/requirements-doc.txt | 0 5 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 docs/archive/docs-2.x/VERSION rename requirements-doc.txt => docs/archive/requirements-doc.txt (100%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 843537ada..7b5f30bbc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,10 +4,9 @@ on: push: branches: ["main"] paths: - - 'src/docs' - - 'src/archive/docs-1.x' + - 'docs/archive/docs-2.x/**' + - 'docs/archive/docs-1.x/**' - '.github/workflows/docs.yml' - - 'VERSION' workflow_dispatch: @@ -31,24 +30,24 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Additional python packages - run: pip3 install -r requirements-doc.txt + run: pip3 install -r docs/archive/requirements-doc.txt - name: Setup Pages uses: actions/configure-pages@v4 - name: Build 1.x docs run: | - cd src/archive/docs-1.x + cd docs/archive/docs-1.x make html - - name: Build current docs + - name: Build 2.x docs run: | - cd src/docs + cd docs/archive/docs-2.x make html - name: Relocate 1.x docs run: | - mv src/archive/docs-1.x/_build/html src/docs/_build/html/1.x + mv docs/archive/docs-1.x/_build/html docs/archive/_build/html/1.x - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ./src/docs/_build/html + path: ./docs/archive/_build/html # Deployment job deploy: diff --git a/docs/archive/docs-2.x/Makefile b/docs/archive/docs-2.x/Makefile index 41c270bb3..c3854a522 100644 --- a/docs/archive/docs-2.x/Makefile +++ b/docs/archive/docs-2.x/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . -BUILDDIR = _build +BUILDDIR = ../_build # Put it first so that "make" without argument is like "make help". help: @@ -17,4 +17,4 @@ help: # 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) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/archive/docs-2.x/VERSION b/docs/archive/docs-2.x/VERSION new file mode 100644 index 000000000..38f77a65b --- /dev/null +++ b/docs/archive/docs-2.x/VERSION @@ -0,0 +1 @@ +2.0.1 diff --git a/docs/archive/docs-2.x/conf.py b/docs/archive/docs-2.x/conf.py index 9cedb65a5..b8ff5a005 100644 --- a/docs/archive/docs-2.x/conf.py +++ b/docs/archive/docs-2.x/conf.py @@ -20,8 +20,8 @@ repo_version = "unknown" # Determine short version by file in repo -if os.path.isfile("../../VERSION"): - with open("../../VERSION") as f: +if os.path.isfile("./VERSION"): + with open("./VERSION") as f: repo_version = f.readline().strip() diff --git a/requirements-doc.txt b/docs/archive/requirements-doc.txt similarity index 100% rename from requirements-doc.txt rename to docs/archive/requirements-doc.txt