Skip to content

Commit

Permalink
Merge pull request #1102 from NullVoxPopuli/move-off-cloudflare-pages
Browse files Browse the repository at this point in the history
Fix API Reference docs by moving from Cloudflare to Vercel
  • Loading branch information
NullVoxPopuli authored Jan 10, 2024
2 parents 8bc8d94 + cdaa9b3 commit a625ab2
Showing 1 changed file with 0 additions and 68 deletions.
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/[email protected]
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

0 comments on commit a625ab2

Please sign in to comment.