Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Dec 8, 2024
1 parent 4d711e8 commit 59bdfaa
Showing 1 changed file with 16 additions and 76 deletions.
92 changes: 16 additions & 76 deletions .github/workflows/multidocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MultiDocumentation
name: Docs

on:
push:
Expand All @@ -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 [email protected]
- 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
julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
julia --project=docs/ docs/make-multi.jl

0 comments on commit 59bdfaa

Please sign in to comment.