mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-16 00:41:24 +01:00
953f146091
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: publish-docs
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'sync-docs'
|
|
workflow_dispatch: {}
|
|
permissions:
|
|
contents: read # This is required for actions/checkout and to commit back image update
|
|
deployments: write
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: main
|
|
- name: Checkout private code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: VictoriaMetrics/vmdocs
|
|
token: ${{ secrets.VM_BOT_GH_TOKEN }}
|
|
path: docs
|
|
|
|
- name: Import GPG key
|
|
uses: crazy-max/ghaction-import-gpg@v5
|
|
with:
|
|
gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }}
|
|
passphrase: ${{ secrets.VM_BOT_PASSPHRASE }}
|
|
git_user_signingkey: true
|
|
git_commit_gpgsign: true
|
|
workdir: docs
|
|
|
|
- name: update code and commit
|
|
run: |
|
|
ls -la /
|
|
ls -la /home
|
|
rm -rf content
|
|
cp -r /main/docs content
|
|
make clean-after-copy
|
|
git config --global user.name "${{ steps.import-gpg.outputs.email }}"
|
|
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
|
|
git add .
|
|
git commit -S -m "sync docs with VictoriaMetrics/VictoriaMetrics"
|
|
git push
|
|
working-directory: docs |