Skip to content

Commit

Permalink
fix: missing file reference
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Sep 18, 2024
1 parent 61e4060 commit c79889e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,42 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
docs: [canary-checker, mission-control]
repo: [mission-control]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install ripgrep
run: |
curl -LO https://github.com/BurntSushi/ripgrep/releases/download/14.1.1/ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz
tar xzf ripgrep-14.1.1-x86_64-unknown-linux-musl.tar.gz
mv ripgrep-14.1.1-x86_64-unknown-linux-musl/rg /usr/local/bin/rg
rg --version
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'

- uses: actions/setup-node@v4
with:
node-version: '20.11.1'

- name: Install dependencies and build
run: |
cd ${{ matrix.docs }}
cd ${{ matrix.repo }}
echo "Installing packages in $(pwd)"
npm ci
echo "Building $(pwd)"
npm run build
- name: Check for broken file references
run: |
cd ${{ matrix.docs }}/build
broken_files=$(find . -type f -name "*.html" -exec grep -il "file=../../../modules" {} +)
if [ -n "$broken_files" ]; then
echo "Error: Broken file references found in ${{ matrix.docs }}"
echo "Files with broken references:"
echo "$broken_files"
exit 1
else
echo "No broken file references found in ${{ matrix.docs }}"
exit 0
fi
cd "${{ matrix.repo }}/build"
echo "Checking for broken files in $(pwd)"
echo "Total files: $(ls -alh . | wc -l)"
echo "Total HTML files: $(find . -type f -name "*.html" | wc -l)"
echo "Ripgrep"
# rg 'file=../../../modules' -g '*.html'
prettier:
name: prettier
Expand All @@ -62,4 +68,4 @@ jobs:
- name: Exit with error if format check failed
if: steps.fmt-check.outcome == 'failure'
run: exit 1
run: exit 1
1 change: 0 additions & 1 deletion mission-control/docs/playbooks/examples/action-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ title: Conditional Actions
Conditional actions allow you to execute specific actions based on the success or failure of previous actions.

```yaml title="delete-kubernetes-pod.yaml" file=../../../modules/mission-control/fixtures/playbooks/exec-filter.yaml

```
7 changes: 2 additions & 5 deletions mission-control/docs/reference/playbooks/context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ When templating `actions` with [Go Templates](/reference/scripting/gotemplate),

<details summary="Templating Actions">
<div>
```yaml title="delete-kubernetes-pod.yaml"
file=../../../modules/mission-control/fixtures/playbooks/scale-deployment.yaml{' '}
{16}
```yaml title="delete-kubernetes-pod.yaml" file=../../../modules/mission-control/fixtures/playbooks/scale-deployment.yaml
```
</div>
</details>
Expand All @@ -84,8 +82,7 @@ When templating `actions` with [Go Templates](/reference/scripting/gotemplate),

<details summary="Reusing Action Results">
<div>
```yaml title="action-results.yaml"
file=../../../modules/mission-control/fixtures/playbooks/action-result.yaml
```yaml title="action-results.yaml" file=../../../modules/mission-control/fixtures/playbooks/action-result.yaml
```
</div>
</details>

0 comments on commit c79889e

Please sign in to comment.