no swap
This commit is contained in:
parent
98af938509
commit
5b3ab3993d
1 changed files with 0 additions and 26 deletions
|
|
@ -80,22 +80,6 @@ jobs:
|
|||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Setup Swap
|
||||
run: |
|
||||
SWAP_SIZE=2048 # 2GB
|
||||
CURRENT_SWAP=$(free -m | awk '/^Swap:/ {print $2}' || echo "0")
|
||||
|
||||
if [ "$CURRENT_SWAP" -lt "$SWAP_SIZE" ]; then
|
||||
echo "Creating ${SWAP_SIZE}MB swap file..."
|
||||
dd if=/dev/zero of=/tmp/swapfile bs=1M count=$SWAP_SIZE status=progress
|
||||
chmod 600 /tmp/swapfile
|
||||
mkswap /tmp/swapfile
|
||||
swapon /tmp/swapfile
|
||||
echo "Swap activated: $(free -m | awk '/^Swap:/ {print $2}')MB"
|
||||
else
|
||||
echo "Swap already available: ${CURRENT_SWAP}MB"
|
||||
fi
|
||||
|
||||
- name: Build Web App
|
||||
working-directory: mnemo_cards_web_v2
|
||||
run: |
|
||||
|
|
@ -104,16 +88,6 @@ jobs:
|
|||
--dart-define=API_BASE_URL=https://api.mnemo-cards.online \
|
||||
--dart2js-optimization=O4
|
||||
|
||||
- name: Remove Swap
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f /tmp/swapfile ]; then
|
||||
echo "Removing swap file..."
|
||||
swapoff /tmp/swapfile 2>/dev/null || true
|
||||
rm -f /tmp/swapfile
|
||||
echo "Swap removed"
|
||||
fi
|
||||
|
||||
- name: Deploy Web App
|
||||
run: |
|
||||
rsync -avz --delete mnemo_cards_web_v2/build/web/ \
|
||||
|
|
|
|||
Loading…
Reference in a new issue