You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2021/02/23 01:04:19 UTC
[spark-website] branch asf-site updated: Add github workflow for
checking all doc is generated with the right Jekyll version
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/spark-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 1f275fe Add github workflow for checking all doc is generated with the right Jekyll version
1f275fe is described below
commit 1f275fe7e6ee605165bfed2cb6c5d7d2558d8c4d
Author: attilapiros <pi...@gmail.com>
AuthorDate: Tue Feb 23 10:04:04 2021 +0900
Add github workflow for checking all doc is generated with the right Jekyll version
After https://github.com/apache/spark-website/commit/1bb4e571b6a575d1be55552569da46e843beccc4 the next logical step is automate the checking of the documentation generation:
- checking whether the generation was complete (contains all the generated HTMLs for the last versions of the markdown files)
- checking whether the right version of Jekyll was used
This can be done with a github workflow by rebuilding the documentation and checking whether there are any unstaged changes.
For testing there is a temporary extra commit which adds a new file and modifies an existing one and committing them without the corresponding HTMLs:
```
$ git show --stat
commit c67186399fa3b444dbdaf0e09226eb954ef1e947 (HEAD -> add-workflow)
Author: attilapiros <piros.attila.zsoltgmail.com>
Date: Sat Feb 20 14:21:07 2021 +0100
temporary commit
community.md | 2 +-
new_file.md | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
```
Author: attilapiros <pi...@gmail.com>
Closes #307 from attilapiros/add-workflow.
---
.github/workflows/doc_gen.yml | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/.github/workflows/doc_gen.yml b/.github/workflows/doc_gen.yml
new file mode 100644
index 0000000..58c36b8
--- /dev/null
+++ b/.github/workflows/doc_gen.yml
@@ -0,0 +1,39 @@
+name: Check document generation
+
+on:
+ push:
+ branches:
+ - asf-site
+ pull_request:
+ branches:
+ - asf-site
+
+jobs:
+ lint:
+ name: check wether all documentation was generated with the right Jekyll version
+ runs-on: ubuntu-20.04
+ container:
+ image: dongjoon/apache-spark-github-action-image:20201025
+ steps:
+ - name: Checkout Spark Website repository
+ uses: actions/checkout@v2
+ - name: Install dependencies for documentation generation
+ run: |
+ apt-get update -y
+ apt-get install -y ruby ruby-dev
+ gem install bundler --version 1.17.2
+ bundle install
+ - name: Run documentation build
+ run: |
+ export LC_ALL=C.UTF-8
+ export LANG=C.UTF-8
+ bundle exec jekyll build
+ CHANGED_FILE=( $(git ls-files --modified --other --exclude-standard --directory | grep -v sitemap.xml) )
+ if [ ${#CHANGED_FILE[@]} -ne 0 ]; then
+ echo "Not all documentation was generated and/or not the right Jekyll version was used! Modified / untracked files (excluding sitemap.xml):"
+ echo ${CHANGED_FILE[*]}
+ echo "Git diff (excluding sitemap.xml):"
+ git diff -- . ':(exclude)site/sitemap.xml'
+ exit 1
+ fi
+ shell: /bin/bash {0}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org