Skip to content

Commit

Permalink
revise pat
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiHaoLu committed Sep 24, 2024
1 parent 77a7513 commit 22621ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
- name: Detect package manager
id: detect-package-manager
run: |
export PAT=${{ secrets.PAT }}
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
Expand All @@ -49,11 +48,19 @@ jobs:
echo "Unable to determine package manager"
exit 1
fi
- name: Replace values
shell: bash
env:
PAT: ${{ secrets.PAT }}
run: |
sed -i.back "s|{{PAT}}|${PAT}|g" /.npmrc
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
# env:
# PAT: ${{ secrets.PAT }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@consenlabs:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${PAT}
//npm.pkg.github.com/:_authToken={{PAT}}

0 comments on commit 22621ba

Please sign in to comment.