Skip to content

Commit

Permalink
Merge pull request #14 from diplodoc-platform/new-ci
Browse files Browse the repository at this point in the history
feat: use new github actions
  • Loading branch information
yndx-birman authored Nov 15, 2023
2 parents 179cdaa + 1430ac3 commit a716524
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 31 deletions.
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):
* списки;
* ссылки;
* картинки и т.д.

0 comments on commit a716524

Please sign in to comment.