add new ansys gpt index (#104) #322
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub CI | |
on: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
env: | |
MAIN_PYTHON_VERSION: '3.12' | |
DOCUMENTATION_CNAME: 'ansys.github.io/allie-flowkit' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
style: | |
name: Code style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install required tools | |
run : | | |
sudo apt install golang-golang-x-tools | |
sudo snap install golangci-lint --classic | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python for pre-commit hook | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Run pre-commit hook | |
uses: pre-commit/[email protected] | |
build: | |
name: Build project | |
needs: [style] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: 'go.sum' | |
- name: Verify library builds | |
run: | | |
go build ./pkg/externalfunctions | |
doc-style: | |
name: "Documentation style" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ansys/actions/doc-style@v8 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
doc-build: | |
name: "Build project documentation" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Build project documentation" | |
uses: ansys/actions/doc-build@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
use-python-cache: false | |
skip-install: true | |
requirements-file: doc/requirements.txt | |
check-links: false | |
doc-api-reference: | |
name: "Build API reference documentation" | |
needs: [doc-build, doc-style] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Build GoPages | |
run: | | |
go install github.com/johnstarich/go/gopages@latest | |
gopages -internal -source-link "https://github.com/ansys/allie-flowkit/blob/main/{{.Path}}{{if .Line}}#L{{.Line}}{{end}}" | |
- name: Download HTML documentation artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: documentation-html | |
path: documentation-html | |
- name: Download and execute Python script | |
run: | | |
curl -o doc_api_reference.py https://raw.githubusercontent.com/ansys/allie-sharedtypes/main/pkg/scripts/doc_api_reference.py | |
python doc_api_reference.py ansys allie-flowkit | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation-html-with-api | |
path: documentation-html | |
upload_dev_docs: | |
name: Upload dev documentation | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [doc-api-reference] | |
steps: | |
- name: Deploy the latest documentation | |
uses: ansys/actions/doc-deploy-dev@v8 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
doc-artifact-name: documentation-html-with-api |