-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/cli graphql docs #335
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
19f628b
Add GraphQL documentation generation and deployment workflow
stanlou faa23a6
update package and tsconfig configs, fix workflow typo
stanlou e8dbb13
refactor(cli): improve structure and readability
stanlou b6879a3
Merge branch 'develop' of https://github.com/proto-kit/framework into…
stanlou b9793c7
Merge branch 'develop' of https://github.com/proto-kit/framework into…
stanlou fe5b02e
apply ESLint fixes
stanlou f9f5d3b
add Spectaql as a dependency
stanlou da9a0a8
Merge branch 'develop' of https://github.com/proto-kit/framework into…
stanlou e5b2356
fix ci
stanlou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Generate & Deploy GraphQL Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| jobs: | ||
| generate-docs: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 18 | ||
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Build packages | ||
| run: npm run build | ||
|
|
||
| - name: Generate SpectaQL documentation | ||
| run: npx @proto-kit/cli generate-gql-docs -e | ||
|
|
||
| - name: Upload docs as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: graphql-docs | ||
| path: gqlDocs | ||
|
|
||
| deploy: | ||
| needs: generate-docs | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Download generated docs | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: graphql-docs | ||
| path: ./public | ||
|
|
||
| - name: Set pages URL | ||
| id: vars | ||
| run: | | ||
| repo="${GITHUB_REPOSITORY}" | ||
| pages_url="https://${GITHUB_REPOSITORY_OWNER}.github.io/${repo##*/}" | ||
| echo "pages_url=${pages_url}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Deploy develop branch | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./public | ||
| keep_files: true | ||
|
|
||
| - name: Show deployment URL | ||
| run: | | ||
| echo "GraphQL docs deployed for 'develop':" | ||
| echo "${{ steps.vars.outputs.pages_url }}" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.