Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
srihari07-web authored Nov 27, 2023
1 parent cd6ad5a commit 316411c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ jobs:
steps:
- name: List all files in the repository
run: |
ls -R
ls -R $GITHUB_WORKSPACE
- name: Add config variable
run: |
if [ -f "$GITHUB_WORKSPACE/Indic-Input-Tool-UI/js/api.js" ]; then
sed -i '1s|^|const config = { TRANSLITERATE_API: "'"${{ secrets.API_URL }}"'", API_KEY: "'"${{ secrets.API_KEY }}"'" };\n|' js/api.js
API_JS_PATH=$GITHUB_WORKSPACE/Indic-Input-Tool-UI/js/api.js
ls -R $API_JS_PATH
if [ -f "$API_JS_PATH" ]; then
sed -i "1s|^|const config = { TRANSLITERATE_API: \"\${{ secrets.API_URL }}\", API_KEY: \"\${{ secrets.API_KEY }}\" };\n|" $API_JS_PATH
else
echo "api.js file not found"
exit 1
Expand Down

0 comments on commit 316411c

Please sign in to comment.