fix: temporary removed google calendar support #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD Pipeline | |
on: | |
push: | |
tags: | |
- 'v1.*.*' | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and Push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
file: ./cicd/dockerfiles/insta-bot.Dockerfile | |
context: . | |
push: true | |
tags: haski007/insta-bot:${{ github.ref_name }} | |
- name: Deploy to Digital Ocean | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
HOST: ${{ secrets.DO_HOST }} | |
PASS: ${{ secrets.DO_PASSKEY }} | |
# Add any other environment variables if needed | |
run: | | |
# Install SSH client | |
sudo apt-get update | |
sudo apt-get install -y openssh-client | |
# Start SSH agent and add key | |
eval "$(ssh-agent -s)" | |
echo "$SSH_PRIVATE_KEY" | ssh-add - | |
# Disable host key checking (for automation) | |
ssh-keyscan -H "$HOST" >> ~/.ssh/known_hosts | |
# SSH into the Digital Ocean server and pull the latest image and restart services | |
ssh -o 'StrictHostKeyChecking=no' root@$HOST << 'ENDSSH' | |
cd /path/to/your/app | |
docker-compose pull | |
docker-compose up -d | |
ENDSSH |