Skip to content

Commit 4c70007

Browse files
committed
ci: read Node version from .nvmrc and set it in the environment for deployment workflow
1 parent 9bbc2cf commit 4c70007

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
1515

16+
- name: Read Node version
17+
run: |
18+
NODE_VERSION=$(cat .nvmrc | sed 's/v//')
19+
echo "NODE_VERSION=$NODE_VERSION" >> $GITHUB_ENV
20+
1621
- name: Deploy to VPS
1722
uses: appleboy/[email protected]
1823
with:
@@ -33,7 +38,7 @@ jobs:
3338
cat > .env.local << EOF
3439
DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }}
3540
CLIENT_ID=${{ secrets.CLIENT_ID }}
36-
NODE_VERSION=$(cat .nvmrc | tr -d 'v')
41+
NODE_VERSION=${{ env.NODE_VERSION }}
3742
EOF
3843
3944
# Stop any existing containers

0 commit comments

Comments
 (0)