feat: add deployment & configuration sections (#36) #29
This file contains hidden or 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
# Copyright 2022 The Magma Authors. | |
# | |
# This source code is licensed under the BSD-style license found in the | |
# LICENSE file in the root directory of this source tree. | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# owner: @magma/approvers-infra | |
# purpose: Check the documentation changes for issues and formatting errors | |
# remediation: | |
--- | |
name: Docs Check | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
jobs: | |
docusaurus-test: | |
name: Docusaurus Build & Log | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build docusaurus container | |
run: | | |
cd docusaurus/ | |
docker compose -f docker-compose.yml build dev | |
- name: Start docusaurus container | |
run: | | |
cd docusaurus/ | |
docker compose -f docker-compose.yml up -d dev | |
- name: Wait for docusaurus to start | |
run: | | |
echo "Waiting for Docusaurus to start..." | |
sleep 60 | |
- name: Check running containers | |
run: | | |
echo "Checking running containers..." | |
docker ps -a | |
- name: Check Docusaurus logs | |
run: | | |
echo "Checking Docusaurus logs..." | |
docker logs docusaurus_local | |
- name: Check Docusaurus health | |
run: | | |
echo "Checking Docusaurus health..." | |
curl -f http://localhost:3000 > /dev/null || exit 1 | |
markdown-lint: | |
name: Markdown Format Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install markdownlint-cli | |
run: npm install -g markdownlint-cli | |
- name: Run markdownlint | |
run: markdownlint "docs/**/*.md" "readmes/**/*.md" | |
translation-consistency: | |
name: Translation Consistency Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Grant execute permissions and convert script file | |
run: | | |
chmod +x ./.github/workflows/scripts/check_translations.sh | |
- name: Check Translation Consistency | |
run: | | |
./.github/workflows/scripts/check_translations.sh --debug | |
shell: bash | |
id-filename-sync: | |
name: Docusaurus ID & Filename Sync | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Grant execute permissions to scripts and convert script file | |
run: | | |
chmod +x ./.github/workflows/scripts/check_id_matches_filename.sh | |
- name: Check ID matches filename | |
run: | | |
./.github/workflows/scripts/check_id_matches_filename.sh --debug | |
check-symlinks: | |
name: Broken Symlinks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for broken symlinks in docusaurus/ | |
working-directory: ${{ github.workspace }}/docusaurus | |
run: | | |
BROKEN=$(find . -xtype l) | |
if [ -n "$BROKEN" ]; then | |
echo "❌ Broken symlinks found:" | |
echo "$BROKEN" | |
exit 1 | |
else | |
echo "✅ No broken symlinks found in ./docusaurus." | |
fi | |
markdown-link-check: | |
name: Markdown URL Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
use-quiet-mode: 'yes' | |
use-verbose-mode: 'yes' | |
config-file: '.github/workflows/config/markdown.links.config.json' | |
folder-path: './docusaurus/docs' |