I was researching ways to automatic deployments for blogthedata.com when I push code into main and everything I came across was super complicated. The solution I came up with was to just add a job to my existing CI workflow to SSH into my server and do a git pull. I implemented it in this PR.

  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Deploy to Linode
      uses: appleboy/ssh-action@master
      with:
        host: ${{ secrets.HOST }}
        username: ${{ secrets.USERNAME }}
        key: ${{ secrets.KEY }}
        script: |
          cd blogthedata
          git pull

Check out the AppleBoy Repo for the latest instructions.

Caveats 

1 - If I need to perform a database migration, I still have to do that manually.

Comments

Back to Home
John Solly Profile Picture
John Solly Profile Picture

John Solly

Hi, I'm John, a Software Engineer with a decade of experience building, deploying, and maintaining cloud-native geospatial solutions. I currently serve as a senior software engineer at HazardHub (A Guidewire Offering), where I work on a variety of infrastructure and application development projects.

Throughout my career, I've built applications on platforms like Esri and Mapbox while also leveraging open-source GIS technologies such as OpenLayers, GeoServer, and GDAL. This blog is where I share useful articles with the GeoDev community. Check out my portfolio to see my latest work!