2019-12-04 07:36:50 -06:00
|
|
|
name: publish_docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-05-06 09:29:29 -05:00
|
|
|
- main
|
2019-12-04 07:36:50 -06:00
|
|
|
paths:
|
|
|
|
- 'docs/sources/**'
|
2020-10-14 10:03:35 -05:00
|
|
|
- 'packages/grafana-*/**'
|
2019-12-04 07:36:50 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-10-21 09:01:02 -05:00
|
|
|
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
|
2021-04-27 09:43:41 -05:00
|
|
|
- uses: actions/cache@v2.1.5
|
2020-10-21 09:01:02 -05:00
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
2020-10-14 10:03:35 -05:00
|
|
|
- name: generate-packages-docs
|
2021-03-05 00:54:23 -06:00
|
|
|
uses: actions/setup-node@v2.1.5
|
2020-10-14 10:03:35 -05:00
|
|
|
id: generate-docs
|
|
|
|
with:
|
2020-12-02 14:38:57 -06:00
|
|
|
node-version: '14'
|
2020-10-14 10:03:35 -05:00
|
|
|
- run: yarn install --pure-lockfile --no-progress
|
|
|
|
- run: ./scripts/ci-reference-docs-build.sh
|
2019-12-04 07:36:50 -06:00
|
|
|
- name: publish-to-git
|
2020-10-21 09:01:02 -05:00
|
|
|
uses: ./.github/actions/website-sync
|
2019-12-04 07:36:50 -06:00
|
|
|
id: publish
|
|
|
|
with:
|
|
|
|
repository: grafana/website
|
2020-02-13 08:10:25 -06:00
|
|
|
branch: master
|
2019-12-04 07:36:50 -06:00
|
|
|
host: github.com
|
|
|
|
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
|
|
|
source_folder: docs/sources
|
2021-04-12 02:42:10 -05:00
|
|
|
target_folder: content/docs/grafana/next
|
2020-10-21 09:01:02 -05:00
|
|
|
allow_no_changes: 'true'
|
2019-12-04 07:36:50 -06:00
|
|
|
- shell: bash
|
|
|
|
run: |
|
|
|
|
test -n "${{ steps.publish.outputs.commit_hash }}"
|
2020-12-02 14:38:57 -06:00
|
|
|
test -n "${{ steps.publish.outputs.working_directory }}"
|