I have searched EOTP
error but this is in github action, I cannot input the 2FA code. Moreover,
I cannot see the log and have no idea what has happened.
name: art-component-release
on:
push:
branches:
- "main" # change to the branch you wish to deploy from
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.build-publish.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- id: build-publish
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
with:
path: storybook-static # change to your build folder
build_command: npm run build-storybook
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.2.0
- name: Install dependencies
run: |
npm ci
npm run build
- name: Add Npm Token # add access token to .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc
ls -al
cat ./.npmrc
- name: Publish to npm # publish to npm registry
run: npm publish
env:
GITHUB_TOKEN: ${{ secrets.ART }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
error info is here.
npm error code EOTP
npm error This operation requires a one-time password from your authenticator.
npm error You can provide a one-time password by passing --otp=<code> to the command you ran.
npm error If you already provided a one-time password then it is likely that you either typoed
npm error it, or it timed out. Please try again.
Here is the action link. https://github.com/S-N-O-R-L-A-X/art-components/actions/runs/10548056056/job/29221494477
The easiest solution to this issue is to replace NPM_TOKEN which is currently a personal Publish token with a new npm automation token.