Add explanation for logical environments to docs (#360) #166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs.kosli.com/**' | |
- '!docs.kosli.com/content/client_reference/**' | |
- '!docs.kosli.com/content/helm/**' | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Deploy to local repo | |
- name: Deploy | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: docs-main | |
FOLDER: docs.kosli.com | |
TARGET_DIR: docs.kosli.com | |
# The action takes all the files from FOLDER on main branch and copies them to TARGET_DIR | |
# on docs-main branch. That branch contains only docs.kosli.com folder | |
# | |
# CLEAR_GLOBS_FILE is a way to define which files and folders on TARGET_DIR to delete before | |
# copying from main, and which to keep (the ones starting with '!') | |
# | |
# In our case, cli reference md files, and docs.kosli.com/assets/metadata.json | |
# are not part of the repository - they get generated only in release workflow. | |
# When they get generated they are also copied to docs-main branch, and we don't need to preserve | |
# anything from previous version of docs-main branch - hence no CLEAR_GLOBS_FILE in release.yml. | |
# | |
# When we release just static content, the cli reference md files, and | |
# docs.kosli.com/assets/metadata.json are not present, but we use CLEAR_GLOBS_FILE to preserve | |
# their versions pushed to docs-main during last release - hence CLEAR_GLOBS_FILE in | |
# publish_docs.yml, to prevent removing them before copying | |
CLEAR_GLOBS_FILE: ".clear-files" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |