Add consolelog #4
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
name: Build and Test Docusaurus | |
on: | |
push: | |
branches: [debug-env] # adjust as needed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 # or your preferred version | |
- name: Install dependencies | |
run: npm install | |
# Debug step to verify the environment variable is set. | |
- name: Verify INKEEP_API_KEY is set | |
run: | | |
echo "Verifying environment variable..." | |
if [ -z "$INKEEP_API_KEY" ]; then | |
echo "Error: INKEEP_API_KEY is NOT set" | |
exit 1 | |
else | |
echo "Success: INKEEP_API_KEY is set" | |
# Optional: Print out the length of the key instead of the key itself. | |
echo "The key has ${#INKEEP_API_KEY} characters." | |
fi | |
- name: Build Docusaurus site | |
run: npm run build |