Skip to content

Commit

Permalink
build: revert .yarn ignore, enable corepack in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Jul 28, 2024
1 parent 3550f7b commit 0409d8b
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 922 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ name: Deployment Workflow

# Trigger this workflow on pushes to the specified branch
on:
push:
branches:
- main
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: yarn install
- name: Install dependencies
run: corepack enable yarn && yarn install --immutable

- name: Build Next.js app
run: yarn build
- name: Build Next.js app
run: yarn build

- name: SSH Deploy
# Use the 'appleboy/ssh-action' action for SSH deployment
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }} # server's IP address
username: ${{ secrets.USERNAME }} # server's username
key: ${{ secrets.SSH_PRIVATE_KEY }} # server's SSH private key
passphrase: ${{ secrets.SSH_PASSWORD }} # server's SSH key password
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /home/debian/hikka-next
git pull
yarn install
yarn build
pm2 reload hikka-next
- name: SSH Deploy
# Use the 'appleboy/ssh-action' action for SSH deployment
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }} # server's IP address
username: ${{ secrets.USERNAME }} # server's username
key: ${{ secrets.SSH_PRIVATE_KEY }} # server's SSH private key
passphrase: ${{ secrets.SSH_PASSWORD }} # server's SSH key password
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /home/debian/hikka-next
git pull
yarn install
yarn build
pm2 reload hikka-next
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,7 @@ fabric.properties
.idea/**/azureSettings.xml
*storybook.log

# yarn
.yarn

*.code-workspace
Binary file removed .yarn/install-state.gz
Binary file not shown.
Loading

0 comments on commit 0409d8b

Please sign in to comment.