diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..22226ef22e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build and Push Docker Image +on: + release: + types: [published] + +jobs: + build-and-push: + name: Build Docker and Push to Registry + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Login to GitHub Packages + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: | + ghcr.io/${{ github.repository }}:latest diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml deleted file mode 100644 index fbd55114d0..0000000000 --- a/.github/workflows/lighthouse.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Lighthouse - -on: - pull_request: - paths-ignore: - - 'content/**/*.md' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 20.x - uses: actions/setup-node@v4 - with: - node-version: 20.x - # Build needs around 400 seconds on Netlify. - # We can not rely on "Waiting for 200", since the user - # might push another commit to an existing PR, meaning - # the deploy preview is already online. - - name: Sleep 400 seconds - run: sleep 400 - - name: Waiting for 200 from the Netlify Preview - uses: jakepartusch/wait-for-netlify-action@v1 - id: wait-for-netflify-preview - with: - site_name: 'docs-nestjs' - max_timeout: 600 - - name: Run Lighthouse on urls and validate with lighthouserc - uses: treosh/lighthouse-ci-action@v8 - with: - urls: | - ${{ steps.wait-for-netflify-preview.outputs.url }} - ${{ steps.wait-for-netflify-preview.outputs.url }}/first-steps - runs: 5 - configPath: './lighthouserc.json' - uploadArtifacts: true - temporaryPublicStorage: true