Skip to content

Commit

Permalink
Merge pull request #60 from themr0c/fix-release-yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
themr0c authored Oct 21, 2021
2 parents 780d01b + 13408d0 commit 3e31cf2
Show file tree
Hide file tree
Showing 18 changed files with 68 additions and 67 deletions.
28 changes: 9 additions & 19 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,19 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

Examples:

* This word or expression triggers an illegitimate vale alert.
* This word or expression triggers an ambiguous vale alert.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See the error

1. Add this word or expression:
2. Vale reports an illegitimate alert: error, warning, suggestion.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (complete the following information):**
- Operating system: [for example iOS]
- Browser [for example chrome, safari]
- Version [for example 22]

**Smartphone (complete the following information):**
- Device: [for example iPhone6]
- Operating system: [for example iOS8.1]
- Browser [for example stock browser, safari]
- Version [for example 22]

**Additional context**
Add any other context about the problem here.
Add any other context here.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ assignees: ''
---

**Is your feature request related to a problem? Describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what the problem is.

**Describe the solution you'd like**
**Describe the solution you'd propose**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots here.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#
# SPDX-License-Identifier: EPL-2.0
#
# Add Web IDE link on PRs
name: web-ide

# Add Web IDE link on pull requests
name: Add Web IDE link
on:
pull_request_target:
types: [opened, synchronize]

types:
- opened
- synchronize
jobs:
add-link:
name: Add Web IDE link
runs-on: ubuntu-20.04
steps:
- name: Web IDE Pull Request Check
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-and-publish-to-github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
name: Publish to GitHub Pages
on:
push:
branches: [main]
branches:
- main
jobs:
build:
publish:
name: Publish to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/build-and-validate-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
#

# Name is reused in `publish-netlify.yml`
name: "Build and validate pull request"

name: Build and validate pull request
on:
- pull_request

jobs:
build:
name: "Build and validate pull request"
name: Build and validate pull request
runs-on: ubuntu-20.04
container: "quay.io/eclipse/che-docs:latest"
steps:
Expand All @@ -28,38 +26,32 @@ jobs:
- name: Build using antora # and fail on warning
id: antora-build
run: CI=true antora generate antora-playbook-for-development.yml --stacktrace 2>&1 | (tee | grep WARNING && exit 42 || exit 0)

- 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

- 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
8 changes: 2 additions & 6 deletions .github/workflows/build-and-validate-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,34 @@
# GitHub Actions configuration file for htmltest
# See: https://github.com/wjdp/htmltest

name: Build and validate
name: Build and validate on push
on:
- push
jobs:
build:
name: Build and validate
name: Build and validate 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: Build using antora
id: antora-build
run: CI=true antora generate antora-playbook-for-development.yml --stacktrace

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: doc-content
path: build/site

- 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
4 changes: 1 addition & 3 deletions .github/workflows/publish-netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@

# NOTE: Because this worklow is using secrets, it cannot run directly on a pull-request workflow, which is running in the context of the forked repository.

name: Publish doc-content using netlify

name: Publish pull request doc-content using netlify
on:
workflow_run:
workflows:
- "Build and validate pull request"
types:
- completed

jobs:
publish:
name: Publish doc-content using netlify
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
---
#
# Copyright (c) 2021 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: Release
on:
push:
branches:
- main
jobs:
prose:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/vale.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
---
#
# Copyright (c) 2021 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: Linting with Vale
on:
- pull_request
- push
jobs:
prose:
vale:
name: Linting with Vale
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Vale Linter
uses: errata-ai/[email protected]
with:
Expand Down
4 changes: 3 additions & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock,
properties = md

# Match AsciiDoc files. See: https://docs.errata.ai/vale/scoping
[*.adoc]
# Ignore files in a directory starting by `.`
# to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files
[[!.]*.adoc]
# Styles to load, located in the `StylesPath` folder:
BasedOnStyles = RedHat

Expand Down
9 changes: 9 additions & 0 deletions .vale/styles/RedHat/README-IBM.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= README for Rules from the IBM Style Guide

All rights for the IBM Style Guide belong to IBM.

Our sources of inspiration:

* link:https://github.com/errata-ai/IBM[The primary Vale implementation of the IBM Style Guide]
* https://www.ibm.com/developerworks/library/styleguidelines/index.html[The DeveloperWorks version of the IBM Style Guide]
1 change: 1 addition & 0 deletions .vale/styles/RedHat/README-write-good.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- vale off -->
Based on [write-good](https://github.com/btford/write-good).

> Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too.
Expand Down
4 changes: 0 additions & 4 deletions .vale/styles/RedHat/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Studious-fortnight repository

This repository helps tech writers at Red Hat get up and running with Vale. It serves as the starting point for the Vale Community of Practice at Red Hat.
This repository helps tech writers at Red Hat get up and running with Vale. It is the starting point for the Vale Community of Practice at Red Hat.

* See the documentation: link:https://rolfedh.github.io/studious-fortnight/[Vale for Red Hat documentation writers]
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $ vale .
. Vale should:
+
* Report no error for the new term in the `testvalid.adoc` file
* Optionnally, report an error for the new term in the `testinvalid.adoc` file
* Optionally, report an error for the new term in the `testinvalid.adoc` file

.Additional resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
[id="proc_using-vale-github-action_{context}"]
= Using vale GitHub Action

Consider using vale GitHub Action when your repository is hosted on GitHub, to measure or enforce the project compliance with the Style Guides.
Consider using vale GitHub Action when:

* The content repository is on GitHub.
* The goal is to measure or enforce the project compliance with the Style Guides.

WARNING: Due to the GitHub token permissions, this Action can not post annotations to PRs from forked repositories.

Expand Down
7 changes: 0 additions & 7 deletions red-hat.md

This file was deleted.

0 comments on commit 3e31cf2

Please sign in to comment.