Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API Reference docs by moving from Cloudflare to Vercel #1102

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,71 +173,3 @@ jobs:
header: asset-sizes
path: ./dev/estimate-bytes/comment.txt


PublishDocstoCloudflarePages:
name: Publish Docs to Cloudflare Pages
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
deployments: write
outputs:
url: ${{ steps.publishStep.outputs.url }}
env: ${{ steps.publishStep.outputs.environment }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- run: |
pnpm build:docs
cd docs/
# cloudflare broke all user's Sites that have a "functions" path.
# ... thanks cloudflare. you're usually such a good company :p
#
# - https://github.com/NullVoxPopuli/ember-resources/issues/679
# - https://github.com/TypeStrong/typedoc/issues/2111
# - https://github.com/cloudflare/wrangler2/issues/2240
mv dist/functions dist/funcs
find ./dist -type f -name '*.html' | xargs sed -i.bak --regexp-extended 's:(href="[^"]*)functions/:\1funcs/:g'

- name: Publish to Cloudflare Pages
id: publishStep
uses: cloudflare/pages-action@v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ember-resources
directory: ./docs/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}



PostPreviewURLascommenttoPR:
name: Post Preview URL as comment to PR
runs-on: ubuntu-latest
needs: PublishDocstoCloudflarePages
if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- uses: marocchino/sticky-pull-request-comment@v2
with:
header: preview-urls
# GH Env: ${{ needs.PublishDocstoCloudflarePages.outputs.env }}
message: |+
## Preview URLs
readme: ${{ needs.PublishDocstoCloudflarePages.outputs.url }}
api docs: ${{ needs.PublishDocstoCloudflarePages.outputs.url }}/modules.html




Loading