Skip to content

Commit

Permalink
docs: add publish step
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai committed Apr 22, 2021
1 parent 86233d1 commit b03515f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/actions/github-action-push-to-another-repository
17 changes: 15 additions & 2 deletions .github/workflows/superset-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ on:
- "docs/**"

jobs:
docs:
name: docs
build-deploy:
name: Build & Deploy
runs-on: ubuntu-20.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v2
with:
persist-credentials: false
submodules: recursive
- name: npm install
working-directory: ./docs
run: |
Expand All @@ -29,3 +30,15 @@ jobs:
working-directory: ./docs
run: |
npm run build
- 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:
source-directory: './docs/public'
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: [email protected]
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@
[submodule ".github/actions/chart-releaser-action"]
path = .github/actions/chart-releaser-action
url = https://github.com/helm/chart-releaser-action
[submodule ".github/actions/github-action-push-to-another-repository"]
path = .github/actions/github-action-push-to-another-repository
url = [email protected]:cpina/github-action-push-to-another-repository.git
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Here's the source to the documentation hosted at
The site runs on the Gatsby framework and uses docz for it's
`Documentation` subsection.


## Getting Started

```bash
Expand All @@ -35,7 +34,10 @@ npm run start

## To Publish

To publish, the static site that Gatsby generates needs to be pushed
Github Actions CI automatically publishes the site after changes are
merged to master.

To manually publish, the static site that Gatsby generates needs to be pushed
to the `asf-site` branch on the
[apache/superset-site](https://github.com/apache/superset-site/)
repository. No need to PR here, simply `git push`.
Expand Down

0 comments on commit b03515f

Please sign in to comment.