Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diplodoc-platform/docs-upload-action
https://github.com/diplodoc-platform/docs-upload-action
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/diplodoc-platform/docs-upload-action
- Owner: diplodoc-platform
- Created: 2023-11-03T08:44:52.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-30T22:11:29.000Z (11 months ago)
- Last Synced: 2024-01-31T23:40:37.220Z (11 months ago)
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docs-upload-action GitHub action
This GitHub action upload documentation build output to the storage.
## Inputs
- `github-token` (required) - GitHub access token for authentication and authorization
- `storage-bucket` (required) - The name of the storage bucket where the built documentation will be stored. After the documentation is successfully built, it will be uploaded to this specified bucket.
- `storage-endpoint` (required) - The endpoint URL of the storage service.
- `storage-access-key-id` (required) - The access key ID associated with the account that has permission to access and upload to the specified storage bucket.
- `storage-secret-access-key` (required) - The secret access key associated with the account.
- `storage-region` (required) - The region where the specified storage bucket is located.
- `stage` (default: `stable`) - Deployment environment for the documentation## Usage
Create a file named `.github/workflows/post-build.yml` in your repo.
This workflow must run on completed [build workflow](https://github.com/diplodoc-platform/docs-build-action) and performs the following:
- Uploads build output to storage if the build log does not include errors.
- Adds a comment to the pull request with the build log or preview link.```yaml
name: Upload & Messageon:
workflow_run:
workflows: [Build]
types:
- completedjobs:
post-build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Upload
uses: diplodoc-platform/docs-upload-action@v1
if: github.event.workflow_run.conclusion == 'success'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
storage-endpoint: ${{ vars.DIPLODOC_STORAGE_ENDPOINT }}
storage-region: ${{ vars.DIPLODOC_STORAGE_REGION }}
storage-bucket: ${{ vars.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}- name: Comment message
uses: diplodoc-platform/docs-message-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
project-link: ${{ vars.DIPLODOC_PROJECT_LINK }}
```