Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 404 check to CI #80

Open
maehr opened this issue Nov 7, 2024 · 0 comments
Open

Add 404 check to CI #80

maehr opened this issue Nov 7, 2024 · 0 comments
Assignees

Comments

@maehr
Copy link
Contributor

maehr commented Nov 7, 2024

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

We could add something like to check for 404 before merging.

    - name: Install required dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y wget

    - name: Start Quarto preview server
      run: |
        nohup quarto preview --port 5528 &
        sleep 5  # Give the server time to start

    - name: Check for 404 errors
      run: |
        wget --spider --recursive http://localhost:5528/ -o wget-log.txt || true
        if grep "404 Not Found" wget-log.txt; then
          echo "404 errors found in the following URLs:"
          grep "404 Not Found" wget-log.txt -B 1
          exit 1
        else
          echo "No 404 errors found."
        fi

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants