Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add publish step #14304

Merged
merged 1 commit into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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