From 117d4bb9b4c393e0b2d6516c5f226c7b56eecdb8 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:57:41 -0500 Subject: [PATCH] ci: Reuse workflow for ci --- .github/workflows/ci.yml | 45 ++++++---------------------------------- 1 file changed, 6 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dce620..3806ef1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,42 +2,9 @@ name: CI on: [push, pull_request] jobs: build: - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/setup-python@v5 - with: - python-version: '3.10' - cache: pip - cache-dependency-path: '**/requirements*.txt' - - run: pip install -r requirements.txt - - if: github.repository == 'open-contracting/standard_profile_template' - run: make update extract - - run: make - - run: | - make linkcheck - find . \( -name output.json -o -name output.txt \) -exec rm -r "{}" \; - - run: pytest -W error - # Deploy the built documentation to the staging directory. - - if: github.event_name == 'push' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.PRIVATE_KEY }} - known_hosts: standard.open-contracting.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGveFGTJ9yyObNGDUCUyzyFkm6Kzh3YqIt1qB7B/KU6E - - if: github.event_name == 'push' - uses: bcomnes/netrc-creds@v3 - with: - machine: standard.open-contracting.org - login: manage - password: ${{ secrets.ELASTICSEARCH_PASSWORD }} - - if: github.event_name == 'push' && success() && github.repository != 'open-contracting/standard_profile_template' - env: - PATH_PREFIX: profiles/TODO/ - PRODUCTION: ${{ startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/latest' }} - RELEASE: ${{ startsWith(github.ref, 'refs/tags') }} - VERSION: "1.0" - shell: bash - run: curl -sS https://raw.githubusercontent.com/open-contracting/deploy/main/deploy-docs.sh | bash - + uses: open-contracting/.github/.github/workflows/ci-profile.yml@main + secrets: + private-key: ${{ secrets.PRIVATE_KEY }} + elasticsearch-password: ${{ secrets.ELASTICSEARCH_PASSWORD }} + with: + path-prefix: profiles/TODO/