diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a27e2776..eac0cc19 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -4,19 +4,14 @@ on: workflow_dispatch: push: branches: ["master"] -permissions: - contents: read - pages: write - id-token: write -concurrency: - group: "pages" - cancel-in-progress: false -env: - BUILD_PATH: "." jobs: build: - name: Build runs-on: ubuntu-latest + permissions: + contents: read + env: + BUILD_PATH: . + PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: # checkout repository - name: Checkout repository @@ -28,7 +23,9 @@ jobs: python-version: "3.11" # building - name: Install 'documentation' dependencies - run: pip install -r python/requirements.mkdocs.txt + run: | + pip install . + pip install -r python/requirements.mkdocs.txt - name: Build documentation run: python src/export docs # set up Pages @@ -40,8 +37,11 @@ jobs: with: path: ${{ env.BUILD_PATH }}/site deploy: - runs-on: ubuntu-latest needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -49,4 +49,5 @@ jobs: name: Deploy steps: - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v1 + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index f0af50a0..954f4e3d 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -4,13 +4,14 @@ on: workflow_dispatch: release: types: [published] -permissions: - contents: read -env: - BUILD_PATH: "." jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + env: + BUILD_PATH: . + PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: # checkout repository - name: Checkout repository @@ -24,21 +25,26 @@ jobs: - name: Install dependencies run: | python -m venv .venv - ./.venv/Scripts/python -m pip install --upgrade pip - ./.venv/Scripts/pip install . - ./.venv/Scripts/pip install -r python/requirements.sphinx.txt - ./.venv/Scripts/pip install build + ./.venv/bin/python -m pip install --upgrade pip + ./.venv/bin/pip install . + ./.venv/bin/pip install -r python/requirements.sphinx.txt + ./.venv/bin/pip install build # build package - name: Build package - run: ./.venv/Scripts/python src/export package + run: | + . ./.venv/bin/activate + python src/export package + deactivate # upload package as artifact - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: path: ${{ env.BUILD_PATH }}/dist publish: - runs-on: ubuntu-latest needs: build + runs-on: ubuntu-latest + permissions: + contents: write steps: # download artifact - name: Download artifact diff --git a/.github/workflows/pycqa.yaml b/.github/workflows/pycqa.yaml index 14023f98..634a7839 100644 --- a/.github/workflows/pycqa.yaml +++ b/.github/workflows/pycqa.yaml @@ -9,6 +9,8 @@ on: jobs: tooling: runs-on: ubuntu-latest + env: + PIP_DISABLE_PIP_VERSION_CHECK: 1 steps: # checkout repository - name: Checkout repository @@ -20,7 +22,9 @@ jobs: python-version: "3.8" # tooling - name: Install 'tooling' dependencies - run: pip install -r python/requirements.tooling.txt + run: | + pip install . + pip install -r python/requirements.tooling.txt - name: Tooling run: | black . diff --git a/src/export/__main__.py b/src/export/__main__.py index feaa40a0..eedb57fc 100644 --- a/src/export/__main__.py +++ b/src/export/__main__.py @@ -149,7 +149,7 @@ def package(source: Path): generate_documentation(source, only_rst_man=True) # print() if getenv("CI", "false") == "true": - process = Popen(("./venv/Scripts/python", "-m", "build"), shell=False) # nosec + process = Popen(("./.venv/bin/python", "-m", "build"), shell=False) # nosec else: process = Popen(("pdm", "build"), shell=False) # nosec process.communicate()