Skip to content

Commit

Permalink
chore: add env vars and PR checking
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonMeade committed Jun 20, 2024
1 parent 5f36a77 commit 1f63450
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 108 deletions.
108 changes: 0 additions & 108 deletions .github/workflows/deploy.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ 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:
Expand Down Expand Up @@ -75,6 +77,17 @@ jobs:
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
env:
CI: false
REACT_APP_AWS_USER_POOL_ID: ${{ secrets.AWS_USER_POOL_ID }}
REACT_APP_AWS_REGION: ${{ secrets.AWS_REGION }}
REACT_APP_AWS_CLIENT_ID: ${{ secrets.AWS_CLIENT_ID }}
REACT_APP_AWS_ADMIN_IDENTITY_POOL_ID: ${{ secrets.AWS_ADMIN_IDENTITY_POOL_ID }}
REACT_APP_AWS_USER_IDENTITY_POOL_ID: ${{ secrets.AWS_USER_IDENTITY_POOL_ID }}
REACT_APP_LAST_FM_KEY: ${{ secrets.LAST_FM_KEY }}
REACT_APP_DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
REACT_APP_DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
REACT_APP_API_SERVER_URL: ${{ secrets.API_SERVER_URL }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -85,6 +98,8 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# if not a pull request, deploy the site
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
needs: build
steps:
Expand Down

0 comments on commit 1f63450

Please sign in to comment.