-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into gitlab_auth
- Loading branch information
Showing
10 changed files
with
209 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# | ||
# Copyright (c) 2020 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
name: Build and validate | ||
on: | ||
- pull_request | ||
jobs: | ||
build: | ||
name: link checker # This job name is set as mandatory in the GitHub configuration. | ||
runs-on: ubuntu-20.04 | ||
container: "quay.io/eclipse/che-docs:latest" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Necessary for git diff in vale step | ||
|
||
- name: Build using antora | ||
id: antora-build | ||
run: CI=true antora generate antora-playbook.yml --stacktrace | ||
|
||
- name: Upload artifact doc-content | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: doc-content | ||
path: build/site | ||
|
||
- name: Store PR info for publish-netlify | ||
run: | | ||
echo "${{ github.event.number }}" > PR_NUMBER | ||
echo "${{ github.event.pull_request.head.sha }}" > PR_SHA | ||
- name: Upload artifact pull-request-number for publish-netlify | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pull-request-number | ||
path: PR_NUMBER | ||
|
||
- name: Upload artifact pull-request-sha for publish-netlify | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: pull-request-sha | ||
path: PR_SHA | ||
|
||
# htmltest: | ||
# name: link checker # This name is set as mandatory in the GitHub configuration. | ||
# runs-on: ubuntu-20.04 | ||
# container: "quay.io/eclipse/che-docs:latest" | ||
# needs: build | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Download artifacts | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: doc-content | ||
|
||
- name: Cache htmltest status code of checked external URLs # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-htmltest | ||
with: | ||
key: refcache.json | ||
path: .cache/htmltest | ||
|
||
- name: Validate links using htmltest | ||
id: validate-links | ||
run: htmltest | ||
|
||
# unusedimages: | ||
# name: Report unused images | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
|
||
- name: Report Unused Images | ||
run: tools/detect-unused-images.sh | ||
|
||
# vale-diff: | ||
# name: Validate language on new and modified files in PR | ||
# runs-on: ubuntu-20.04 | ||
# container: "quay.io/eclipse/che-docs:latest" | ||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 0 | ||
|
||
- name: Validate language on files added or modified | ||
run: | | ||
vale -v | ||
echo "Changed files, in comparison to branch $GITHUB_BASE_REF" | ||
git diff --name-only --diff-filter=AM origin/$GITHUB_BASE_REF | ||
vale $(git diff --name-only --diff-filter=AM origin/$GITHUB_BASE_REF) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# | ||
# Copyright (c) 2020 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
# GitHub Actions configuration file for htmltest | ||
# See: https://github.com/wjdp/htmltest | ||
|
||
name: Build and validate documentation on push | ||
on: | ||
- push | ||
jobs: | ||
build: | ||
name: Build the documentation | ||
runs-on: ubuntu-20.04 | ||
container: "quay.io/eclipse/che-docs:latest" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build using antora | ||
id: antora-build | ||
run: CI=true antora generate antora-playbook.yml --stacktrace | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: doc-content | ||
path: build/site | ||
|
||
htmltest: | ||
name: link checker # This name is set as mandatory in the GitHub configuration. | ||
runs-on: ubuntu-20.04 | ||
container: "quay.io/eclipse/che-docs:latest" | ||
needs: build | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache htmltest status code of checked external URLs # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-htmltest | ||
with: | ||
key: refcache.json | ||
path: .cache/htmltest | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: doc-content | ||
|
||
- name: Check internal and external links using htmltest | ||
id: validate-links | ||
run: htmltest | ||
|
||
vale-all-content: | ||
name: Validate style on all content on push | ||
runs-on: ubuntu-20.04 | ||
container: "quay.io/eclipse/che-docs:latest" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Vale | ||
run: | | ||
vale -v | ||
vale . | ||
unusedimages: | ||
name: Report unused images | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Detect Unused Images | ||
run: tools/detect-unused-images.sh |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.