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

h #1

Closed
wants to merge 3 commits into from
Closed

h #1

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
48 changes: 48 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build docs
uses: diplodoc-platform/docs-build-action@v3
with:
src-root: './docs'
build-root: './docs-html'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
63 changes: 7 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,11 @@
# Diplodoc Static Template
Мои редакции:

### Confgure GitHub Pages
- [Yandex Tracker](#yandex-tracker)
- [Умный дом Яндекса](#smart-home)
- [Yandex Factory](#yandex-factory)

Enable GitHub pages (Settings -> Pages -> Build and deployment (Source) -> GitHub Action), then your github action will start working
**Группа обеспечения документирования** — это удаленные технические писатели, которые помогают менеджерам службы управления знаниями в разработке документации. Все писатели группы обеспечения документирования проходят специальную подготовку, обучение и обладают набором специфичных навыков для решения конкретных задач.

### Local run

```sh
rm -rf ./build
npx -y @diplodoc/cli -i ./ -o ./build
npx -y http-server ./build --port=5000 --host=0.0.0.0 --cors
```

After that, just open http://localhost:5000

### Docker

If you need to build docker, just run the code

```sh
rm -rf ./build ./_site
npx -y @diplodoc/cli -i ./ -o ./_site
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t MYCOMPANY/docs .
docker push MYCOMPANY/docs:latest
```

### GitHub Docker build Action

Add the following secrets into the secret storage

```
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
```

Add the following steps into `.github/workflows/build.yml`

```yaml
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: MYCOMPANY/docs:latest
```
**Мини-редакция** — команда исполнителей из группы обеспечения документирования, которая следит за качеством определенного направления документирования. Для каждого сервиса или группы документов выделяется одна мини-редакция.

[Руководителем мини-редакции](https://wiki.yandex-team.ru/kpb-writers-lead/ownership/) может выступать менеджер службы управления знаниями или писатель из группы обеспечения документирования, обладающий достаточным опытом в качестве лида. Руководитель занимается организационной работой.