This is an automated email from the ASF dual-hosted git repository.
pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new b939740 SUBMARINE-739. Automatically Deploy Submarine Website
b939740 is described below
commit b939740f58c862a7e0211f149162c07b13692afb
Author: Kevin <[email protected]>
AuthorDate: Thu Feb 18 18:14:50 2021 +0800
SUBMARINE-739. Automatically Deploy Submarine Website
### What is this PR for?
We have updated the Submarine website in SUBMARINE-724.
Add a Github Action for automatically deploying the website when other
contributors update the docs.
Related to
https://v2.docusaurus.io/docs/deployment#triggering-deployment-with-github-actions
### What type of PR is it?
[Improvement]
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-739
### How should this be tested?
https://travis-ci.com/github/pingsutw/hadoop-submarine/builds/217975280
### Screenshots (if appropriate)
### Questions:
* Does the license files need an update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Kevin <[email protected]>
Signed-off-by: Kevin <[email protected]>
Closes #522 from pingsutw/SUBMARINE-739 and squashes the following commits:
8e38e7cf [Kevin] SUBMARINE-739. Automatically Deploy Submarine Website
---
.github/workflows/deploy_website.yml | 62 ++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/.github/workflows/deploy_website.yml
b/.github/workflows/deploy_website.yml
new file mode 100644
index 0000000..82ab9ba
--- /dev/null
+++ b/.github/workflows/deploy_website.yml
@@ -0,0 +1,62 @@
+name: Deploy Submarine documentation
+
+on:
+ pull_request:
+ branches: [master]
+ push:
+ branches: [master]
+
+jobs:
+ checks-website:
+ if: github.event_name != 'push'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '12.x'
+ - name: Test Build
+ run: |
+ cd website
+ if [ -e yarn.lock ]; then
+ yarn install --frozen-lockfile
+ elif [ -e package-lock.json ]; then
+ npm ci
+ else
+ npm i
+ fi
+ npm run build
+ deploy-website:
+ if: github.event_name != 'pull_request'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - uses: actions/setup-node@v1
+ with:
+ node-version: '12.x'
+ - name: Add key to allow access to repository
+ env:
+ SSH_AUTH_SOCK: /tmp/ssh_agent.sock
+ run: |
+ mkdir -p ~/.ssh
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
+ echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
+ chmod 600 ~/.ssh/id_rsa
+ - name: Deploy Submarine website
+ env:
+ USE_SSH: true
+ GIT_USER: pingsutw
+ DEPLOYMENT_BRANCH: asf-site
+ run: |
+ cd website
+ git config --global user.email "[email protected]"
+ git config --global user.name "pingsutw"
+ if [ -e yarn.lock ]; then
+ yarn install --frozen-lockfile
+ elif [ -e package-lock.json ]; then
+ npm ci
+ else
+ npm i
+ fi
+ yarn deploy
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]