how about add an env file? #31
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
VITE_INTEGRATION_ID: ${{ secrets.VITE_INTEGRATION_ID }} | |
VITE_DB: ${{ secrets.VITE_DB }} | |
VITE_PROXY: ${{ secrets.VITE_PROXY }} | |
jobs: | |
setup: | |
name: build & publish to gh-pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org/ | |
cache: "pnpm" | |
- name: install | |
run: pnpm install | |
- name: build | |
run: pnpm run build:server | |
- name: create cname | |
run: | | |
touch dist/CNAME | |
echo "www.fanqidi.com" > dist/CNAME | |
- name: Publish dist to gh-pages | |
uses: rayluo/[email protected] | |
with: | |
source-directory: dist |