diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65a1c46..4317519 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI - Staging +name: Deploy to production on: push: @@ -8,32 +8,25 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: '20' - - run: corepack enable && corepack prepare pnpm@10.33.0 --activate - - run: pnpm install --no-frozen-lockfile + node-version: '22' + - run: npm install -g pnpm + - run: pnpm install - run: pnpm build - run: pnpm test docker: needs: build runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: - - uses: actions/checkout@v4 - - name: Set tag - id: meta - run: echo "branch=$(echo ${{ github.ref_name }} | sed 's/\//-/g')" >> $GITHUB_OUTPUT + - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - uses: docker/build-push-action@v4 + with: context: . - push: true - tags: | - chafah/nodejs-app:${{ steps.meta.outputs.branch }}-dev - chafah/nodejs-app:dev + push: false + tags: landmark-devops:latest