-
-
Notifications
You must be signed in to change notification settings - Fork 279
feat: add @metamask/platform-api-docs package #8012
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
base: main
Are you sure you want to change the base?
Changes from all commits
9af5f7d
6f5169f
09b2c92
9396df8
b91a407
195a811
15006c5
17adacd
8ee4add
726937a
3c7be5e
5d791fa
82b3e45
196cd2c
c8e5285
e5a9c27
b4b841a
2726f4f
2b77320
808fd3c
0c0f5e3
8f51c7a
519826e
f439b61
e19d372
2a71f63
9999b19
b18ca18
3ca6451
b450618
d690a4f
925e551
2449194
f9a7d4b
e805340
b6a517f
325e1ab
5baf2a7
b0c93dd
0a1c767
4b5247d
6d28783
3dc5593
0c5d2c0
2e2a7a0
c904bee
cbae825
166e62f
b441b46
0e30615
170f9ea
b7921f1
e940db5
f95346b
985c43c
bda8e73
26e79fe
da27777
cba00c2
f27d25e
05f2902
96578b1
af38898
4ffd287
3923f7d
b831c27
fbb0797
187727a
5a6bf65
b6d3b4f
3d02e9f
f3adf53
baffffe
dea72a3
2b9ec1d
fbc0aed
b334965
ccdc8dc
e5cef32
89832b1
36158b5
b664468
c7cde64
66c8d81
a6585b0
9d2fbf7
40ad9c3
3f115e7
1b1b547
34c820f
c767ae0
671e21a
a85fa0f
13ccf66
f389539
f7c1b80
d590bde
f47b949
30fb5e2
79e76e7
d4160fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Deploy Platform API Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-docs: | ||
| name: Build Platform API docs | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: true | ||
|
|
||
| - name: Generate and build Platform API docs | ||
| # The site is published under the `/platform-api/` subdirectory of | ||
| # the repo's GitHub Pages site so that other doc sites (e.g. | ||
| # package API docs) can be hosted alongside under sibling paths. | ||
| run: | | ||
| yarn docs:platform-api:build \ | ||
| --site-url "https://${{ github.repository_owner }}.github.io" \ | ||
| --site-base-url "/${{ github.event.repository.name }}/platform-api/" | ||
|
|
||
| - name: Upload build artifact (PR) | ||
| if: github.event_name == 'pull_request' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: platform-api-docs | ||
| path: .platform-api-docs/build/ | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload build artifact for deploy job | ||
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: platform-api-docs-build | ||
| path: .platform-api-docs/build/ | ||
| retention-days: 1 | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
| needs: build-docs | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: platform-api-docs-build | ||
| path: build/ | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| uses: peaceiris/actions-gh-pages@v4.1.0 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./build | ||
| destination_dir: platform-api | ||
| # Preserve sibling subdirectories (e.g. /package-api/) so this | ||
| # deploy only overwrites /platform-api/. | ||
| keep_files: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - Initial release of the platform-api-docs package ([#8012](https://github.com/MetaMask/core/pull/8012)) | ||
|
|
||
| [Unreleased]: https://github.com/MetaMask/core/ |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just merged in a PR so that going forward all packages have not only an MIT license but also Apache 2.0. Can you add Apache 2.0? You can see https://github.com/MetaMask/core/tree/main/scripts/create-package/package-template for how the license files are laid out now.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in f389539. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| This project is licensed under either of | ||
|
|
||
| * MIT license ([LICENSE.MIT](LICENSE.MIT)) | ||
| * Apache License, Version 2.0 ([LICENSE.APACHE2](LICENSE.APACHE2)) | ||
|
|
||
| at your option. |
Uh oh!
There was an error while loading. Please reload this page.