Skip to content

Commit

Permalink
updates to link checking
Browse files Browse the repository at this point in the history
  • Loading branch information
JulioPDX committed Nov 7, 2023
1 parent 9638034 commit 2c5a07f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,18 +215,16 @@ jobs:
runs-on: ubuntu-latest
needs: [file-changes]
if: needs.file-changes.outputs.docs == 'true'
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: 'start docker-compose stack'
run: |
cp development/docker-compose.yml .
sed -i 's/cd\sansible-cvp\/\s\&\&//g' docker-compose.yml
docker-compose -f docker-compose.yml up -d webdoc_cvp
docker-compose -f docker-compose.yml ps
docker-compose -f development/docker-compose.yml up -d webdoc_cvp
docker-compose -f development/docker-compose.yml ps
- name: 'test connectivity to mkdoc server'
run: |
sleep 30
until docker exec webdoc_cvp curl -s -I http://localhost:8000/ ; do sleep 2; done
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:8000)" != "200" ]]; do sleep 5; done'
- name: check links for 404
run: |
docker run --network container:webdoc_cvp raviqqe/muffet:2.6.1 http://127.0.0.1:8000 \
Expand Down
18 changes: 4 additions & 14 deletions development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,11 @@ services:
command: [ "/bin/sh", "-c", "while true; do sleep 30; done;" ]

webdoc_cvp:
image: titom73/mkdocs:latest
image: python:3.11.0-alpine3.17
container_name: webdoc_cvp
working_dir: /data
volumes:
- ${PWD}/:/docs
ports:
- 8001:8000
entrypoint: ""
command: ["sh", "-c", "cd ansible-cvp/ && pip install -r ansible_collections/arista/cvp/docs/requirements.txt && mkdocs serve --no-livereload --dev-addr=0.0.0.0:8000 -f mkdocs.yml"]

webdoc_avd:
image: titom73/mkdocs:latest
container_name: webdoc_avd
volumes:
- ${PWD}/:/docs
- ${PWD}/:/data
ports:
- 8000:8000
entrypoint: ""
command: ["sh", "-c", "cd ansible-avd/ && pip install -r ansible_collections/arista/avd/docs/requirements.txt && mkdocs serve --no-livereload --dev-addr=0.0.0.0:8000 -f mkdocs.yml"]
entrypoint: "sh /data/development/entrypoint.sh"
17 changes: 17 additions & 0 deletions development/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Installing git
echo "Installing dependencies"
apk add --no-cache git git-fast-import

# Making /data and /site safe for git
git config --global --add safe.directory /data
git config --global --add safe.directory /site

# install pip requirements
echo "Installing Python requirements"
pip install -r ansible_collections/arista/cvp/docs/requirements.txt --upgrade

# Start mkdocs
echo "Starting mkdocs"
mkdocs serve --no-livereload --dev-addr=0.0.0.0:8000 -f mkdocs.yml

0 comments on commit 2c5a07f

Please sign in to comment.