Skip to content

Commit

Permalink
Fix linkchecker workflow (#2906)
Browse files Browse the repository at this point in the history
* Fix linkchecker

* Making DPF pulling remote

* Ignoring ansys forum and courses links
  • Loading branch information
germa89 authored Mar 19, 2024
1 parent 32fb872 commit ba6d8fe
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 19 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ concurrency:

env:
ON_CI: True
DOCKER_PACKAGE: ghcr.io/ansys/mapdl
DOCKER_IMAGE_VERSION_DOCS_BUILD: v23.1.0
MAIN_PYTHON_VERSION: '3.9'
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.1.0
MAIN_PYTHON_VERSION: '3.10'
PYANSYS_OFF_SCREEN: True
DPF_START_SERVER: False
DPF_PORT: 21002
Expand All @@ -33,6 +33,29 @@ jobs:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.2

- name: "Login in Github container registry"
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "DPF server activation"
run: |
$(docker pull ghcr.io/ansys/dpf-core:22.2dev && docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}.") &
- name: "Pull, launch, and validate MAPDL service"
id: start_mapdl
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }}
DISTRIBUTED_MODE: "dmp"
run: |
export INSTANCE_NAME=MAPDL
.ci/start_mapdl.sh &> mapdl_launch.log & export DOCKER_PID=$!
echo "Launching MAPDL service at PID: $DOCKER_PID"
echo "DOCKER_PID=$(echo $DOCKER_PID)" >> $GITHUB_OUTPUT
- name: "Setup Python"
uses: actions/setup-python@v5
with:
Expand All @@ -53,19 +76,6 @@ jobs:
pip install .
xvfb-run python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"
- name: "Login in Github container registry"
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: "Pull, launch, and validate MAPDL service"
run: .ci/start_mapdl.sh
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}'

- name: "Retrieve PyMAPDL version"
id: version
run: |
Expand All @@ -76,10 +86,9 @@ jobs:
run: |
pip install .[doc]
- name: "DPF server activation"
- name: "Waiting for the services to be up"
run: |
docker pull ghcr.io/ansys/dpf-core:22.2dev
docker run -d --name dpfserver -p ${{ env.DPF_PORT }}:50052 ghcr.io/ansys/dpf-core:22.2dev && echo "DPF Server active on port ${{ env.DPF_PORT }}."
.ci/waiting_services.sh
- name: LinkCheck
run: |
Expand Down
2 changes: 2 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@
"https://mapdl.docs.pyansys.com/*",
"https://ansysaccount.b2clogin.com/*", # behind payfirewall
"https://ansyshelp.ansys.com/*", # behind payfirewall
"https://forum.ansys.com/forums/*", # It is detected as broken
"https://courses.ansys.com/*", # It is detected as broken
]
linkcheck_anchors_ignore = [
# these anchors are picked by linkcheck as broken but they are not.
Expand Down

0 comments on commit ba6d8fe

Please sign in to comment.