mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-04 06:11:47 +00:00
ci(docs): Deploy production docs to Grebedoc
This commit is contained in:
1 file changed
+11
-12
@@ -54,22 +54,21 @@ jobs:
|
|||||||
- name: Install Rspress and dependencies
|
- name: Install Rspress and dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build Rspress documentation
|
- name: Build documentation with Rspress
|
||||||
env:
|
env:
|
||||||
SITE_PATH: ${{ github.ref != 'refs/heads/main' && format('/@{0}/', forgejo.event.number) || '/' }}
|
SITE_PATH: ${{ github.ref != 'refs/heads/main' && format('/@{0}/', forgejo.event.number) || '/' }}
|
||||||
run: npm run docs:build
|
run: npm run docs:build
|
||||||
|
|
||||||
- name: Install Wrangler
|
- name: Deploy to Grebedoc (Production)
|
||||||
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' && secrets.CLOUDFLARE_API_TOKEN != ''
|
if: github.ref == 'refs/heads/main'
|
||||||
run: npm install --save-dev wrangler@latest
|
run: |
|
||||||
|
go tool git-pages-cli https://continuwuity.org \
|
||||||
- name: Deploy to Cloudflare Pages (Production)
|
--server grebedoc.dev \
|
||||||
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' && secrets.CLOUDFLARE_API_TOKEN != ''
|
--token "${{ forgejo.token }}" \
|
||||||
uses: https://github.com/cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4
|
--upload-dir doc_build \
|
||||||
with:
|
--pretty-urls \
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
--comment "${{ forgejo.sha }}" \
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
--verbose
|
||||||
command: pages deploy ./doc_build --branch="main" --commit-dirty=true --project-name="${{ vars.CLOUDFLARE_PROJECT_NAME }}"
|
|
||||||
|
|
||||||
- name: Deploy to Grebedoc (Preview)
|
- name: Deploy to Grebedoc (Preview)
|
||||||
if: github.ref != 'refs/heads/main'
|
if: github.ref != 'refs/heads/main'
|
||||||
|
|||||||
Reference in new issue
Block a user