diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index f4688c9..bd24ad9 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -7,7 +7,7 @@ name: Deploy Next.js site to Pages on: # Runs on pushes targeting the default branch push: - branches: + branches: - github-pages # Allows you to run this workflow manually from the Actions tab @@ -74,6 +74,16 @@ jobs: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + - name: "Create env file" + run: | + touch .env + echo APP_ID=${{ secrets.APP_ID }} >> .env + echo APP_SECRET=${{ secrets.APP_SECRET }} >> .env + echo SPACE_ID=${{ secrets.SPACE_ID }} >> .env + echo NEXT_PUBLIC_SITE_URL=${{ vars.SITE_URL }} >> .env + echo REDIS_HOST=redis >> .env + echo REDIS_PORT=6379 >> .env + echo REDIS_PASSWORD=${{ secrets.REDIS_PASSWORD }} >> .env - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build - name: Upload artifact @@ -91,4 +101,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4