Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diplodoc-platform/docs-release-action
https://github.com/diplodoc-platform/docs-release-action
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/diplodoc-platform/docs-release-action
- Owner: diplodoc-platform
- Created: 2023-07-20T00:28:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-30T22:11:27.000Z (11 months ago)
- Last Synced: 2024-10-10T06:36:05.701Z (3 months ago)
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# docs-release-action GitHub Action
This GitHub action registers new stable version of documentation.
## Inputs
- `revision` (required) - The revision or version identifier for the documentation to be built.
- `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-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.
- `version` (default: empty string) - The documentation version name.
- `server` (default: 'https://viewer.diplodoc.com') - The root URL of the server.## Usage
Create a file named `.github/workflows/release.yml` in your repo.
This workflow performs the following:
- Checks for changes to run the build for documentation only
- Builds the documentation
- Uploads build output to the storage
- Registers new stable version of documentation```yaml
name: Releaseon:
workflow_dispatch:
pull_request:
types: [closed]
paths: 'docs/**'
branches:
- mainjobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: diplodoc-platform/docs-build-action@v3
with:
revision: "${{ github.sha }}"
src-root: "./docs"
upload:
needs: build
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Upload
uses: diplodoc-platform/docs-upload-action@v1
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 }}
release:
needs: upload
runs-on: ubuntu-latest
steps:
- name: Release
uses: diplodoc-platform/docs-release-action@v2
with:
revision: "${{ github.sha }}"
storage-bucket: ${{ vars.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
```### Release version
```yaml
name: Release tagon:
push:
paths: 'docs/**'
tags:
- 'v*.*.*'jobs:
<...>
release:
needs: upload
runs-on: ubuntu-latest
steps:
- name: Release
uses: diplodoc-platform/docs-release-action@v2
with:
revision: "${{ github.sha }}"
version: "${{ github.ref_name }}"
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
```### Release on custom server
```yaml
name: Releaseon:
workflow_dispatch:
pull_request:
paths: 'docs/**'
types: [closed]
branches:
- mainjobs:
<...>
release:
needs: upload
runs-on: ubuntu-latest
steps:
- name: Release
uses: diplodoc-platform/docs-release-action@v2
with:
server: "https://my.custom.docs.server.com"
revision: "${{ github.sha }}"
storage-bucket: ${{ secrets.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DIPLODOC_ACCESS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DIPLODOC_SECRET_ACCESS_KEY }}
```