Skip to content

Commit 50375b2

Browse files
committed
fix(chore): add ssh key for signin commit
1 parent 6c4a499 commit 50375b2

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/deploy-package.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: '0 12 * * MON'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
deploy:
1013
runs-on: ubuntu-24.04
@@ -13,17 +16,21 @@ jobs:
1316
- uses: actions/[email protected]
1417
with:
1518
fetch-depth: '0'
16-
persist-credentials: false
1719
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
20+
21+
- name: Setup SSH
22+
run: |
23+
mkdir -p ~/.ssh
24+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
25+
chmod 600 ~/.ssh/id_rsa
26+
ssh-keyscan github.com >> ~/.ssh/known_hosts
27+
1828
- name: Git Identity
1929
run: |
2030
git config --global user.name 'scaleway-bot'
2131
git config --global user.email '[email protected]'
22-
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
23-
env:
24-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
32+
git remote set-url origin [email protected]:${{ github.repository }}.git
2533
- uses: pnpm/[email protected]
26-
2734
- name: Use Node.js
2835
uses: actions/[email protected]
2936
with:
@@ -37,7 +44,6 @@ jobs:
3744
run: make publish
3845
env:
3946
HUSKY: 0
40-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
4147

4248
# https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
4349
- name: Publish to npm

0 commit comments

Comments
 (0)