Skip to content

Commit

Permalink
Populate process.env variable during build.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonghan committed Aug 4, 2024
1 parent 24a0fdf commit 26f00c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ jobs:
sed -i '/Sitemap/d' ./public/robots.txt
echo "Sitemap: ${{ steps.env-set.outputs.siteUrl }}/sitemap.xml" >> ./public/robots.txt
- name: Create process.env
shell: bash
run: |
touch .env
echo "NEXT_PUBLIC_PUSHER_APP_KEY=${{ secrets.NEXT_PUBLIC_PUSHER_APP_KEY }}" >> .env
echo "NEXT_PUBLIC_PUSHER_CLUSTER=${{ secrets.NEXT_PUBLIC_PUSHER_CLUSTER }}" >> .env
- name: Build with Next.js
run: |
export RELEASE_VERSION="${{ github.run_id }}-walcron"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ _Note:_ Add create PAT, personal profile -> Developer Settings -> Fine Grain Tok

NextJS for static generation `output: "export"` in `next.config.js`, requires all pages to have removed `"use server"`. Generally all pages that requires _/api_ call needs to be removed as well, hence need to figure out how to relink these site directly to walcron.

Required to declare secrets for 'NEXT_PUBLIC_PUSHER_APP_KEY, NEXT_PUBLIC_PUSHER_CLUSTER' in .env file (written in merge.yml). These variables are used for process.env.

## Rust Webassembly

1. To regenerate new Wasm from webassembly, run the command below:
Expand Down

0 comments on commit 26f00c1

Please sign in to comment.