Add details about uniqueness of 'partnerIncidentId' to doc #10
This file contains 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
name: Generate html from yml docs and publish to pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
generate_docs: | |
name: Generate HTML Docs | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.7 | |
- name: Check for .yml files | |
run: | | |
if ls *.yml 1> /dev/null 2>&1; then | |
echo "YAML files found." | |
else | |
echo "No YAML files found. Exiting." | |
exit 1 | |
fi | |
- name: Install Node.js | |
uses: actions/setup-node@v4.0.2 | |
- name: Install Redocly CLI | |
run: npm install -g @redocly/cli | |
- name: Generate HTML files | |
run: | | |
for file in *.yml; do | |
redocly build-docs -o ${file%.*}.html $file | |
done | |
- name: Add noIndex Meta Tag | |
run: | | |
for file in *.html; do | |
if [[ -f "$file" ]]; then | |
echo "Found HTML file: $file" | |
if sed -i '/<head>/a <meta name="robots" content="noindex">' "$file"; then | |
echo "Added meta tag to $file successfully." | |
else | |
echo "Failed to add meta tag to $file." | |
fi | |
fi | |
done | |
shell: bash | |
- name: Set up Git | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: . # Root folder where HTML files are located |