diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..35fe7716 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ + +name: Deploy + +on: + push: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: ubuntu-latest + + + steps: + - uses: actions/checkout@v4 + - run: docker build . -t harishneel/next-js-app + - run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin + - run: docker push harishneel/next-js-app:latest \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8a2fa081..9deef1a2 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,3 +1,5 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs name: Integration @@ -15,20 +17,19 @@ jobs: strategy: matrix: node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Build command" - run: npm run build + - run: npm i + - run: npm run build + unit-tests: runs-on: ubuntu-latest @@ -36,16 +37,14 @@ jobs: strategy: matrix: node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Running test cases" - run: npm run test \ No newline at end of file + - run: npm test + \ No newline at end of file