Skip to content

Merge pull request #4 from ECAP5/1-setup-the-project #2

Merge pull request #4 from ECAP5/1-setup-the-project

Merge pull request #4 from ECAP5/1-setup-the-project #2

Workflow file for this run

name: CI/CD
on:
push:
branches: [ "main", "release/**" ]
pull_request:
branches: [ "main", "release/**" ]
permissions:
actions: write
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
DOCUMENTATION_ARTIFACT_NAME: ecap5-bsom-docs-${{github.run_number}}-${{github.run_attempt}}
BUILD_CACHE_KEY: build-directory-${{ github.run_id }}-${{ github.run_attempt }}
jobs:
prepare:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4.1.1
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -GNinja
- name: Cache build directory
if: always()
uses: actions/cache/save@v4.0.1
env:
cache-folder-path: ${{github.workspace}}/build
with:
path: ${{ env.cache-folder-path }}
key: ${{ runner.os }}-${{env.BUILD_CACHE_KEY}}
documentation:
runs-on: self-hosted
needs: report

Check failure on line 39 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI/CD

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 39, Col: 12): Job 'documentation' depends on unknown job 'report'. .github/workflows/main.yml (Line: 64, Col: 12): Job 'deploy' depends on job 'documentation' which creates a cycle in the dependency graph.
steps:
- uses: actions/checkout@v4.1.1
- name: Import build directory
uses: actions/cache/restore@v4.0.1
env:
cache-folder-path: ${{github.workspace}}/build
with:
path: ${{ env.cache-folder-path }}
key: ${{ runner.os }}-${{env.BUILD_CACHE_KEY}}
- name: Generate documentation
run: ninja -C ${{github.workspace}}/build docs
- uses: actions/upload-pages-artifact@v3.0.1
with:
name: ${{env.DOCUMENTATION_ARTIFACT_NAME}}
path: ${{github.workspace}}/build/docs/documentation/build/html
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: self-hosted
needs: documentation
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4.0.4
id: deployment
with:
artifact_name: ${{env.DOCUMENTATION_ARTIFACT_NAME}}
preview: true