caprover / deploy-from-github

Apache License 2.0
58 stars 18 forks source link

You don't think this is better? #8

Closed mohitxskull closed 2 days ago

mohitxskull commented 1 year ago
name: Stats Backend Deploy
on: [push]
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [18.x]

    steps:
      - name: Check out repository code
        uses: actions/checkout@v4

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
          cache: yarn
          cache-dependency-path: ./yarn.lock

      - run: yarn global add turbo

      - run: yarn prune:back-stats

      - run: |
          cp ./captain-definition ./out
          cp ./Dockerfile ./out

      - run: |
          cd out
          tar -czvf ./deploy.tar ./*
          mv ./deploy.tar ../

      - uses: caprover/deploy-from-github@main
        with:
          server: '${{ secrets.CAP_SERVER }}'
          app: '${{ secrets.BACK_STATS_APP }}'
          token: '${{ secrets.BACK_STATS_TOKEN }}'
maietta commented 1 year ago

Could you be more specific?

I see you are using the "out" directory name, but I don't think that's necessary.

I also see you are using Yarn, but that's really just a matter of developer preference.

Also, why deviate from the nomenclature of the secrets?

So, without any other context, I am going to say no, this is absolutely in no way better than what was already provided in the example.

mohitxskull commented 1 year ago

I was just talking about using the tar from linux cli rather then using that action, there is any performance improvement if use the tar action?

everything you said was about using yarn and out dir!

Boscop commented 1 week ago

@mohitxskull The tar GH action is cross-platform