2020-09-18 15:23:48 -04:00
|
|
|
name: Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
2020-12-08 18:27:08 -05:00
|
|
|
- "docs/**"
|
2020-09-18 15:23:48 -04:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2020-12-08 18:27:08 -05:00
|
|
|
- "docs/**"
|
2020-09-18 15:23:48 -04:00
|
|
|
|
|
|
|
jobs:
|
2021-04-23 12:43:58 -04:00
|
|
|
build-deploy:
|
|
|
|
name: Build & Deploy
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2022-02-02 16:02:51 -05:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: docs
|
2020-09-18 15:23:48 -04:00
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2020-12-08 18:27:08 -05:00
|
|
|
uses: actions/checkout@v2
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2021-04-23 12:43:58 -04:00
|
|
|
submodules: recursive
|
2022-02-02 16:02:51 -05:00
|
|
|
- name: yarn install
|
2020-12-08 18:27:08 -05:00
|
|
|
run: |
|
2022-02-03 13:35:08 -05:00
|
|
|
yarn install --check-cache
|
2022-02-02 16:02:51 -05:00
|
|
|
- name: yarn build
|
2020-12-08 18:27:08 -05:00
|
|
|
run: |
|
2022-02-02 16:02:51 -05:00
|
|
|
yarn build
|
2021-04-23 12:43:58 -04:00
|
|
|
- name: deploy docs
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
uses: ./.github/actions/github-action-push-to-another-repository
|
|
|
|
env:
|
|
|
|
API_TOKEN_GITHUB: ${{ secrets.SUPERSET_SITE_BUILD }}
|
|
|
|
with:
|
2022-02-02 16:02:51 -05:00
|
|
|
source-directory: './docs/build'
|
2021-04-23 12:43:58 -04:00
|
|
|
destination-github-username: 'apache'
|
|
|
|
destination-repository-name: 'superset-site'
|
|
|
|
target-branch: 'asf-site'
|
|
|
|
commit-message: "deploying docs: ${{ github.event.head_commit.message }} (apache/superset@${{ github.sha }})"
|
|
|
|
user-email: dev@superset.apache.org
|