From ef92f24652465c9355000eb3452f8c19422f0c42 Mon Sep 17 00:00:00 2001 From: Vatsal Sanjay Date: Sat, 22 Feb 2025 20:59:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(github-actions):=20improve=20s?= =?UTF-8?q?earch=20index=20update=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-search.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-search.yml b/.github/workflows/update-search.yml index 2316383..5fe34b1 100644 --- a/.github/workflows/update-search.yml +++ b/.github/workflows/update-search.yml @@ -13,9 +13,17 @@ on: - 'scripts/fetch_blog_content.js' - 'scripts/package.json' +# Add permissions needed for the workflow +permissions: + contents: write # This allows the action to commit and push changes + packages: read # This allows the action to read from npm + jobs: update-search: runs-on: ubuntu-latest + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm steps: - uses: actions/checkout@v4 @@ -32,7 +40,14 @@ jobs: node-version: '20' cache: 'npm' cache-dependency-path: scripts/package-lock.json - + + - name: Debug directory structure + run: | + echo "Current directory contents:" + ls -la + echo "Scripts directory contents:" + ls -la scripts/ + - name: Install Ruby dependencies run: | gem install bundler @@ -43,7 +58,8 @@ jobs: - name: Install Node.js dependencies run: | cd scripts - npm ci + echo "Installing dependencies in scripts directory" + npm ci --verbose - name: Fetch blog content run: |