diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fdcdfa29..41724d23 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -99,3 +99,5 @@ jobs: echo "${no_log}" exit 1 fi + nox-sessions: + uses: ./.github/workflows/reusable-nox.yml diff --git a/.github/workflows/reusable-nox.yml b/.github/workflows/reusable-nox.yml new file mode 100644 index 00000000..fafc2836 --- /dev/null +++ b/.github/workflows/reusable-nox.yml @@ -0,0 +1,26 @@ +--- +name: nox + +"on": + workflow_call: + +jobs: + nox: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - session: build + python-versions: "3.11" + name: "Run nox ${{ matrix.session }} session" + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Setup nox + uses: wntrblm/nox@2024.03.02 + with: + python-versions: "${{ matrix.python-versions }}" + - name: "Run nox -s ${{ matrix.session }}" + run: | + nox -s "${{ matrix.session }}" diff --git a/noxfile.py b/noxfile.py new file mode 100644 index 00000000..8a12a81b --- /dev/null +++ b/noxfile.py @@ -0,0 +1,20 @@ +import nox + + +@nox.session +def build(session: nox.Session): + """ + Build the AWX Operator docsite. + """ + session.install( + "-r", + "docs/requirements.in", + "-c", + "docs/requirements.txt", + ) + session.run( + "mkdocs", + "build", + "--strict", + *session.posargs, + )