Skip to content
Permalink
Browse files
add workflow
  • Loading branch information
morningman-cmy committed Dec 13, 2021
1 parent 5dded9f commit dca32cf9e503b85fb8c08eece075e3c5c76b26b6
Showing 3 changed files with 52 additions and 2 deletions.
@@ -0,0 +1,38 @@
name: Cron Deploy

on:
schedule:
- cron: '0 1 * * *'

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.16.1

- name: Build
run: |
git clone https://github.com/apache/incubator-doris.git incubator-doris
export BRANCH=master
cd incubator-doris/docs && npm install && npm run build
touch .vuepress/dist/.dummy
ls .vuepress/dist/
export DORIS_COMMIT=`git rev-parse HEAD`
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: asf-site
publish_dir: ./incubator-doris/docs/.vuepress/dist
destination_dir: master
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'Automated deployment with doris branch master@${{ env.DORIS_COMMIT }}'

@@ -24,11 +24,11 @@ jobs:
run: |
git clone https://github.com/apache/incubator-doris.git incubator-doris
git checkout ${{ github.event.inputs.branch }}
export DORIS_COMMIT=`git rev-parse HEAD`
export BRANCH=${{ github.event.inputs.branch }}
cd incubator-doris/docs && npm install && npm run build
touch .vuepress/dist/.dummy
ls .vuepress/dist/
export DORIS_COMMIT=`git rev-parse HEAD`
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
@@ -19,7 +19,19 @@ under the License.

# Doris document website

The only working branch for this repository is `asf-site`, and it's mostly updated by travis' autobuild.
This repo is for [Apache Doris(Incubating) website](https://doris.apache.org)

And it use Github Action to automatically sync content from [Apache Doris(Incubating) Code Repo](https://github.com/apache/incubator-doris)

There are 2 Github Actions:

1. cron-deploy-website.yml

It will sync at 01:00 AM everyday from Doris's master branch.

2. manual-deploy-website.yml

It can only be triggered manually, and you can specify the branch name you want to sync.

## View the website

0 comments on commit dca32cf

Please sign in to comment.