diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index abbc41ec..d36bd48a 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,6 +1,7 @@ name: Deploy docs to GitHub Pages on: + pull_request: push: branches: [main] @@ -25,6 +26,7 @@ jobs: run: make docs - name: Deploy to GitHub Pages + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..85778e77 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +MAKEFILE_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) + +FALDIR = $(MAKEFILE_DIR)/projects/fal +FALCLIENTDIR = $(MAKEFILE_DIR)/projects/fal_client + +.PHONY: docs + +docs: + $(MAKE) -C $(FALDIR) docs + $(MAKE) -C $(FALCLIENTDIR) docs + rm -rf docs + mkdir -p docs/_build/html + mkdir -p docs/_build/html/fal_sdk + mkdir -p docs/_build/html/fal_client + cp -a $(FALDIR)/docs/_build/html docs/_build/html/fal_sdk + cp -a $(FALCLIENTDIR)/docs/_build/html docs/_build/html/fal_client