diff --git a/.github/workflows/publish-docs-on-release.yml b/.github/workflows/publish-docs-on-release.yml index f65a1b4..be60ce1 100644 --- a/.github/workflows/publish-docs-on-release.yml +++ b/.github/workflows/publish-docs-on-release.yml @@ -7,43 +7,11 @@ on: jobs: docs: - defaults: - run: - shell: bash -l {0} - - runs-on: macos-latest - steps: - - name: Check out diffpy.pdffit2 - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Fetches branches and tags - - - name: Initialize miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: build - auto-update-conda: true - environment-file: environment.yml - auto-activate-base: false - python-version: 3.12 - - - name: Conda config - run: >- - conda config --set always_yes yes - --set changeps1 no - - - name: Install diffpy.pdffit2 and docs requirements - run: | - conda install --file requirements/conda.txt - conda install --file requirements/docs.txt - conda install --file requirements/build.txt - python -m pip install . --no-deps - - - name: build documents - run: make -C doc html - - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./doc/build/html + permissions: + contents: write + uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0 + with: + project: diffpy.pdffit2 + c_extension: true + headless: false + python_version: 3.12 diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index 13a2d17..cd5b043 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -9,46 +9,11 @@ on: jobs: validate: - defaults: - run: - shell: bash -l {0} - - runs-on: ubuntu-latest - steps: - - name: Check out diffpy.pdffit2 - uses: actions/checkout@v4 - - - name: Initialize miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: test - auto-update-conda: true - environment-file: environment.yml - auto-activate-base: false - python-version: 3.12 - - - name: Conda config - run: >- - conda config --set always_yes yes - --set changeps1 no - - - name: Install diffpy.pdffit2 and requirements - run: | - conda install --file requirements/conda.txt - conda install --file requirements/test.txt - conda install --file requirements/build.txt - python -m pip install . --no-deps - - - - name: Validate diffpy.pdffit2 - run: | - pytest --cov - coverage report -m - codecov - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - verbose: true - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0 + with: + project: diffpy.pdffi2 + c_extension: false + headless: true + python_version: 3.12 + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}