mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-07-24 17:49:42 +03:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v5...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
name: publish-docs
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- 'docs/**'
|
|
- '.github/workflows/docs.yaml'
|
|
workflow_dispatch: {}
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
path: __vm
|
|
persist-credentials: false
|
|
|
|
- name: Checkout private code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
repository: VictoriaMetrics/vmdocs
|
|
token: ${{ secrets.VM_BOT_GH_TOKEN }}
|
|
path: __vm-docs
|
|
persist-credentials: true
|
|
|
|
- name: Import GPG key
|
|
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
|
|
id: import-gpg
|
|
with:
|
|
gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }}
|
|
passphrase: ${{ secrets.VM_BOT_PASSPHRASE }}
|
|
git_user_signingkey: true
|
|
git_commit_gpgsign: true
|
|
git_config_global: true
|
|
|
|
- name: Copy docs
|
|
id: update
|
|
run: |
|
|
find docs -type d -maxdepth 1 -mindepth 1 -exec \
|
|
sh -c 'rsync -zarvh --delete {}/ ../__vm-docs/content/$(basename {})/' \;
|
|
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_OUTPUT
|
|
working-directory: __vm
|
|
|
|
- name: Push to vmdocs
|
|
run: |
|
|
git config --global user.name "${{ steps.import-gpg.outputs.email }}"
|
|
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
git add .
|
|
git commit -S -m "sync docs with VictoriaMetrics/VictoriaMetrics commit: ${{ steps.update.outputs.SHORT_SHA }}"
|
|
git push
|
|
fi
|
|
working-directory: __vm-docs
|