-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
I looked the docs and search a lot, but couldn't find any solution for this issue:
I'm running the build step creating the .npmrc file
Currently the Build Step works well. But the deploy fails with the error bellow:
Error: The deployment failed: HTTP status client error (401 Unauthorized) for url ([https://npm.pkg.github.com/@](https://npm.pkg.github.com/@<company>/<private-package-name>)
Note: I tried with permissions.package: read and permissions.package: write usong the ${{secrets.GITHUB_TOKEN}} but haven't worked since the package is outside the repo so I changed to use a PAT
Part of my github actions file:
jobs:
deploy:
name: Deploy
environment: Production
runs-on: ubuntu-latest
permissions:
packages: write # Needed to install private packages
id-token: write # Needed for auth with Deno Deploy
contents: read # Needed to clone the repository
....
- name: Build step
run: |
cd backend/deno
echo "@<company>:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_ACCESS_TOKEN }}" >> .npmrc
echo "Caching the index.ts" && deno cache index.ts --allow-import
echo "Running the build" && deno task build --environment production
- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "<project name>"
entrypoint: "index.ts" # 📝 Update the entrypoint
root: "./backend/deno" # 📝 Update the rootMetadata
Metadata
Assignees
Labels
No labels