Removed pricing #64
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: Build and Push Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4.2.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "pnpm" | |
| - name: Caching nextjs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| ${{ github.workspace }}/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
| # - uses: jongwooo/next-cache@v1 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Create env file | |
| run: | | |
| echo "NEXT_TELEMETRY_DISABLED=1" >> .env | |
| echo "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}" >> .env | |
| echo "APP_URL=${{ secrets.APP_URL }}" >> .env | |
| echo "CLERK_SECRET_KEY=${{ secrets.CLERK_SECRET_KEY }}" >> .env | |
| echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" >> .env | |
| echo "CLERK_ENCRYPTION_KEY=${{ secrets.CLERK_ENCRYPTION_KEY }}" >> .env | |
| echo "Environment variables have been written to .env file." | |
| - name: Build Next.js app | |
| run: | | |
| pnpm run build | |
| - name: Login to GitHub Container Registry | |
| run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build and push Docker image | |
| run: | | |
| docker build -t ghcr.io/${{ github.repository }}:latest . | |
| docker push ghcr.io/${{ github.repository }}:latest |