Skip to content

#291 Fix EU REACH, and some other miscellaneous documentation improvements #850

#291 Fix EU REACH, and some other miscellaneous documentation improvements

#291 Fix EU REACH, and some other miscellaneous documentation improvements #850

Workflow file for this run

name: Pre-merge checks
# Run only on main branch. This avoids duplicated actions on PRs
on:
pull_request:
push:
tags:
- '*'
branches:
- main
paths-ignore:
- '.github/**'
- 'pyproject.toml'
workflow_dispatch:
merge_group:
env:
DOCUMENTATION_CNAME: 'bomanalytics.grantami.docs.pyansys.com'
jobs:
local_checks:
name: Package checks
uses: ./.github/workflows/local_checks.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration_checks:
name: Integration checks
needs: local_checks
if: ${{ !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
uses: ./.github/workflows/server_checks.yml
secrets:
AZURE_APP_ID: ${{ secrets.AZURE_APP_ID }}
AZURE_SECRET: ${{ secrets.AZURE_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_VM_NAME: ${{ secrets.AZURE_VM_NAME }}
TEST_SERVER_URL: ${{ secrets.TEST_SERVER_URL }}
TEST_SERVER_READ_USER: ${{ secrets.TEST_SERVER_READ_USER }}
TEST_SERVER_READ_PASS: ${{ secrets.TEST_SERVER_READ_PASS }}
TEST_SERVER_WRITE_USER: ${{ secrets.TEST_SERVER_WRITE_USER }}
TEST_SERVER_WRITE_PASS: ${{ secrets.TEST_SERVER_WRITE_PASS }}
doc-deploy-dev:
name: "Deploy development documentation"
runs-on: ubuntu-latest
needs: [ integration_checks ]
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/doc-deploy-dev@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
doc-artifact-name: Documentation-html
Release:
if: contains(github.ref, 'refs/tags') && github.event_name == 'push'
needs: integration_checks
runs-on: ubuntu-latest
steps:
- name: "Deploy stable documentation"
uses: pyansys/actions/doc-deploy-stable@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
doc-artifact-name: Documentation-html
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: actions/download-artifact@v3
with:
name: ansys-grantami-bomanalytics-wheel
path: dist
- uses: actions/download-artifact@v3
with:
name: Documentation-pdf
path: dist
- uses: actions/download-artifact@v3
with:
name: Documentation-html
path: dist/documentation-html/
- name: "Compressing HTML documentation"
uses: vimtor/[email protected]
with:
files: dist/documentation-html/
dest: dist/documentation-html.zip
# note how we use the PyPI tokens
- name: Upload to PyPI
run: |
pip install twine
twine upload --non-interactive --skip-existing dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
dist/*.whl
dist/documentation-html.zip
dist/*.pdf