-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1102 from NullVoxPopuli/move-off-cloudflare-pages
Fix API Reference docs by moving from Cloudflare to Vercel
- Loading branch information
Showing
1 changed file
with
0 additions
and
68 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||