shipit icon indicating copy to clipboard operation
shipit copied to clipboard

Archive Shipit?

Open jeanbmar opened this issue 2 years ago • 6 comments

@gregberge Shipit was very useful at one time, but better and easier approaches exist today, such as Github workflows. The repo should probably be archived, with links to modern alternatives provided for guidance to beginners.

jeanbmar avatar Oct 15 '22 10:10 jeanbmar

Yeah you are right! I will do it as soon as I have a moment.

gregberge avatar Oct 15 '22 11:10 gregberge

@jeanbmar I would need a list of good modern alternatives to update the readme about it. Feel free to propose! Thanks!

gregberge avatar Oct 17 '22 12:10 gregberge

I mostly use GitHub actions and Docker. I think I would advise using them as follows:

  1. Setup a GitHub repo and a configure a workflow
  2. Configure all secrets, keys, etc. in the GitHub repository secrets
  3. Match remote servers with repo branches / tags to automate deployment on push or merge
  4. Run any local command natively in the GitHub workflow container (usually ubuntu-latest)
  5. Consider using Docker and a Dockerfile to run remote commands. Docker is available by default in GitHub actions. For projects that don't use containers, use ssh and rsync to connect and deploy to remote servers from the workflow container.

There are probably other alternatives but GitHub is quite easy to use, free and community offers a lot of support. What do you think?

jeanbmar avatar Oct 17 '22 14:10 jeanbmar

shipit is still useful for performing the actual deployment from github actions -> a staging/production server, or perhaps I'm missing something?

jwir3 avatar Dec 13 '22 16:12 jwir3

@jwir3 You should be able to ssh or rsync directly from a workflow. Or maybe you have something else in mind? An even better alternative (imo) can be self-hosted runners, e.g.

name: my-service

on:
  push:
    branches:
      - 'master'

jobs:
  deploy:
    name: deploy
    runs-on: self-hosted
    strategy:
      matrix:
        node-version: [ 18.x ]
    steps:
      - uses: actions/checkout@v3
      - name: Using node ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
      - name: Bundle dependencies
        run: |
          npm ci --omit=dev --omit=optional

jeanbmar avatar Dec 13 '22 17:12 jeanbmar

@jeanbmar Wow, thanks for this. I didn't even know self-hosted runners existed. I really appreciate the feedback.

jwir3 avatar Dec 13 '22 17:12 jwir3