From 59bdfaa10ba6e6b21e373277aaa0586d11a49d73 Mon Sep 17 00:00:00 2001 From: Carlo Lucibello Date: Sun, 8 Dec 2024 20:22:46 +0100 Subject: [PATCH] workflow --- .github/workflows/multidocs.yml | 92 ++++++--------------------------- 1 file changed, 16 insertions(+), 76 deletions(-) diff --git a/.github/workflows/multidocs.yml b/.github/workflows/multidocs.yml index 46418813d..5d5720ae3 100644 --- a/.github/workflows/multidocs.yml +++ b/.github/workflows/multidocs.yml @@ -1,4 +1,4 @@ -name: MultiDocumentation +name: Docs on: push: @@ -8,87 +8,27 @@ on: pull_request: jobs: - build_multidocs: + docs: + name: Documentation runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: - version: '1.10.5' + version: '1' - uses: julia-actions/cache@v2 - - - name: Set up - run: git config --global init.defaultBranch master - - - name: Build GNNGraphs docs - run: - julia --project=GNNGraphs/docs/ -e ' - using Pkg; - pkg"dev ./GNNGraphs"; - Pkg.instantiate(); - include("GNNGraphs/docs/make.jl")' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - - name: Build GNNlib docs - run: julia --project=GNNlib/docs/ -e ' - using Pkg; - pkg"dev ./GNNlib ./GNNGraphs"; - Pkg.instantiate(); - include("GNNlib/docs/make.jl")' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - - name: Build GNNLux docs - run: julia --project=GNNLux/docs/ -e ' - using Pkg; - pkg"dev ./GNNLux ./GNNlib ./GNNGraphs"; - Pkg.instantiate(); - include("GNNLux/docs/make.jl")' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - - name: Build GraphNeuralNetworks docs - run: julia --project=GraphNeuralNetworks/docs/ -e ' - using Pkg; - pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs"; - Pkg.instantiate(); - include("GraphNeuralNetworks/docs/make.jl")' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - - - # Build and deploy multidocs - - name: Install dependencies for multidocs - run: julia --project=docs/ -e ' - using Pkg; - pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs ./GNNLux"; - Pkg.instantiate();' - - name: Check if objects.inv exists for GraphNeuralNetworks - run: | - if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then - echo "GraphNeuralNetworks: objects.inv exists." - else - echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1 - fi - - name: Config git - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + # Build individual docs + - run: julia GNNGraphs/docs/make.jl + - run: julia GNNlib/docs/make.jl + - run: julia GNNLux/docs/make.jl + - run: julia GraphNeuralNetworks/docs/make.jl + # Compile multi docs + - name: MultiDocs run: | git config user.name github-actions git config user.email github-actions@github.com - - - name: Build multidocs - if: github.event_name == 'pull_request' - run: | - julia --project=docs/ docs/make-multi.jl PR - - - name: Build and deploy multidocs - if: github.event_name != 'pull_request' - run: | - julia --project=docs/ docs/make-multi.jl \ No newline at end of file + julia --project=docs/ -e 'using Pkg; Pkg.instantiate()' + julia --project=docs/ docs/make-multi.jl