Update CNAME from talkarr.app to www.talkarr.app #75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint, Check and Deploy | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| lint-and-typecheck: | |
| name: Lint and Typecheck | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: write | |
| checks: write | |
| pull-requests: write | |
| security-events: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --non-interactive --prefer-offline | |
| - name: Run ESLint | |
| continue-on-error: true | |
| id: eslint-frontend | |
| run: | | |
| SARIF_ESLINT_IGNORE_SUPPRESSED=true yarn lint --max-warnings=0 --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif | |
| - name: Upload Frontend ESLint results | |
| uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: eslint-results.sarif | |
| wait-for-processing: true | |
| - name: Fail if ESLint found issues | |
| if: steps.eslint-frontend.outcome == 'failure' | |
| run: exit 1 | |
| - name: Run typecheck | |
| run: yarn typecheck | |
| build-app: | |
| name: Build app for production | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .next/cache | |
| # Generate a new cache whenever packages or source files change. | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
| # If source files changed but packages didn't, rebuild from a prior cache. | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --non-interactive --prefer-offline | |
| - name: Build with Next.js | |
| run: NEXT_TELEMETRY_DISABLED=1 yarn build | |
| - name: Upload artifact | |
| if: github.ref_name == 'main' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: ./out | |
| deploy-app: | |
| name: Deploy to GitHub Pages | |
| if: github.ref_name == 'main' | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build-app | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |