Skip to content

fix: add google analytics | Remove adsense #50

fix: add google analytics | Remove adsense

fix: add google analytics | Remove adsense #50

Workflow file for this run

name: Deploy to EC2
on:
workflow_dispatch:
push:
branches:
- vercel_build
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up SSH
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > private_key.pem
chmod 600 private_key.pem
- name: Pull changes and restart Nginx
env:
EC2_HOST: 23.22.150.3
run: |
ssh -o StrictHostKeyChecking=no -i private_key.pem ubuntu@$EC2_HOST << 'EOF'
set -e
sudo git config --global --add safe.directory /var/www/bfr
cd /var/www/bfr
sudo git pull origin vercel_build
sudo npm install
sudo npm run build
sudo systemctl restart nginx
EOF