File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ jobs:
1616 - name : Set up SSH
1717 run : |
1818 mkdir -p ~/.ssh
19- echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
20- chmod 600 ~/.ssh/id_ed25519
21- ssh-keyscan -H ${{ secrets.LINODE_IP }} >> ~/.ssh/known_hosts
19+ echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
20+ chmod 600 ~/.ssh/id_ed25519
21+ ssh-keyscan -H ${{ secrets.LINODE_IP }} >> ~/.ssh/known_hosts
2222
2323 - name : Deploy to Linode
2424 run : |
2525 ssh dev@${{ secrets.LINODE_IP }} << 'EOF'
26- cd /var/www/portfolio-next
27- git checkout staging && git pull origin staging
28- pnpm install
29- pnpm build
30- pm2 restart next-staging || pm2 start pnpm --name "next-staging" -- run start
26+ cd /var/www/portfolio-next && \
27+ source ~/.profile && \
28+ git fetch origin && \
29+ git checkout staging && \
30+ git pull origin staging && \
31+ pnpm install && \
32+ pnpm build && \
33+ pm2 restart next-staging
3134 EOF
You can’t perform that action at this time.
0 commit comments