Skip to content

Turn NEXT_PUBLIC_REFLECT_SERVER into a template parameter. #6

Turn NEXT_PUBLIC_REFLECT_SERVER into a template parameter.

Turn NEXT_PUBLIC_REFLECT_SERVER into a template parameter. #6

name: Deploy Reflect to Preview
on:
pull_request:
branches: [main]
env:
NODE_VERSION: "18.x"
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
- name: npm install
run: |
npm install
- name: publish
env:
REFLECT_AUTH_KEY: ${{ secrets.REFLECT_API_KEY }}
REFLECT_APP_NAME: ${{ vars.REFLECT_APP_NAME }}
run: |
npx reflect publish --app=${REFLECT_APP_NAME}-${GITHUB_HEAD_REF/\//-} --auth-key-from-env=REFLECT_API_KEY