Skip to content

Commit

Permalink
feat: workflow redis
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailDeng authored and AbigailDeng committed Jul 17, 2024
1 parent a4b20b7 commit 83f06b6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -91,4 +101,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

0 comments on commit 83f06b6

Please sign in to comment.