feat: add price page #61
This file contains hidden or 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: Preview Home Page | |
on: | |
workflow_dispatch: | |
pull_request_target: | |
paths: | |
- "projects/fastgpt/**" | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
permissions: | |
contents: read | |
deployments: write | |
pull-requests: write | |
actions: read | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
# Job outputs | |
outputs: | |
url: ${{ steps.deploy.outputs.deployment-url }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
submodules: recursive # Fetch submodules | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
- name: Build | |
env: | |
NEXT_PUBLIC_HOME_URL: https://fastgpt.io | |
NEXT_PUBLIC_USER_URL: https://cloud.fastgpt.io | |
run: | | |
cd projects/fastgpt | |
npm install | |
npm run build | |
- name: Deploy to Cloudflare Pages | |
id: deploy | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} | |
command: pages deploy ./projects/fastgpt/out --project-name=fastgpt-home | |
- name: Comment Preview URL | |
uses: FinleyGe/[email protected] | |
if: success() && github.event_name == 'pull_request_target' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tool: issue-comment | |
title: FastGPT Homepage Preview | |
body: | | |
π **FastGPT Homepage Preview Ready!** | |
π± **Preview URL:** ${{ steps.deploy.outputs.deployment-url }} | |
π [π Click here to visit preview](${{ steps.deploy.outputs.deployment-url }}) | |
--- | |
π‘ This preview will be automatically updated when you push new commits to this PR. |