Skip to content
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

feat: use new github actions #14

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@ name: Build

on:
pull_request:
types: [opened, synchronize]

jobs:
build-docs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build
uses: diplodoc-platform/docs-build-action@v1
uses: diplodoc-platform/docs-build-action@v3
with:
revision: "pr-${{ github.event.pull_request.number }}"
project-name: ${{ secrets.DOCS_PROJECT_NAME }}
src-root: "./"
storage-bucket: ${{ secrets.DOCS_AWS_BUCKET }}
storage-endpoint: ${{ vars.DOCS_AWS_ENDPOINT }}
storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
storage-region: ${{ vars.DOCS_AWS_REGION }}
shared-storage-bucket: "true"
revision: "pr-${{ github.event.pull_request.number }}"
29 changes: 29 additions & 0 deletions .github/workflows/post-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload & Message

on:
workflow_run:
workflows: [Build]
types:
- completed

jobs:
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.DOCS_AWS_ENDPOINT }}
storage-region: ${{ vars.DOCS_AWS_REGION }}
storage-bucket: ${{ vars.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DOCS_AWS_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 }}
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,39 @@ on:
workflow_dispatch:

jobs:
release:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: diplodoc-platform/docs-release-action@v1
- name: Build
uses: diplodoc-platform/docs-build-action@v3
with:
revision: "${{ github.sha }}"
project-name: ${{ secrets.DOCS_PROJECT_NAME }}
src-root: "./"
storage-bucket: ${{ secrets.DOCS_AWS_BUCKET }}
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 }}
project-link: ${{ vars.DIPLODOC_PROJECT_LINK }}
storage-endpoint: ${{ vars.DOCS_AWS_ENDPOINT }}
storage-region: ${{ vars.DOCS_AWS_REGION }}
storage-bucket: ${{ vars.DIPLODOC_STORAGE_BUCKET }}
storage-access-key-id: ${{ secrets.DOCS_AWS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
storage-region: ${{ vars.DOCS_AWS_REGION }}
shared-storage-bucket: "true"
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.DOCS_AWS_KEY_ID }}
storage-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
12 changes: 6 additions & 6 deletions en/syntax/term.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[*term]: Explaining a term or abbreviation using definition syntax.
The _term_ definition may *include* [basic markup](base.md):
* lists;
* links;
* images, etc.

# Definition

The syntax for definitions is:
Expand All @@ -28,3 +22,9 @@ At the moment, the use of definitions in code blocks is possible only if the cod
{% endnote %}

![terms_sample](../_images/terms_sample.png)

[*term]: Explaining a term or abbreviation using definition syntax.
The _term_ definition may *include* [basic markup](base.md):
* lists;
* links;
* images, etc.
14 changes: 7 additions & 7 deletions ru/syntax/term.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
[*term]: Разъяснение термина или сокращения с помощью синтаксиса определений.
Определение _термина_ может **включать** в себя [базовую разметку](base.md):
* списки;
* ссылки;
* картинки и т.д.

# Всплывающие подсказки

Синтаксис для определений имеет вид:

```
[*ключ_термина]: Разъяснение термина или сокращения с помощью синтаксиса определений.
Определение термина может включать в себя _базовую_ разметку.
Определение термина может включать в себя _базовую_ разметку.

Использование [термина](*ключ_термина) в тексте.
```
Expand All @@ -28,3 +22,9 @@
{% endnote %}

![terms_sample](../_images/terms_sample.png)

[*term]: Разъяснение термина или сокращения с помощью синтаксиса определений.
Определение _термина_ может **включать** в себя [базовую разметку](base.md):
* списки;
* ссылки;
* картинки и т.д.