fix: env secret #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build for GH Pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Remove old build files | |
run: | | |
rm -rf dist | |
- name: Install dependencies and build | |
env: | |
VITE_GROWTHBOOK_CLIENT_KEY: ${{ secrets.VITE_GROWTHBOOK_CLIENT_KEY }} | |
run: | | |
npm ci | |
npm run build | |
- name: Deploy to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |