GH Actions: add workflow to automatically deploy the wiki #74
Workflow file for this run
This file contains hidden or 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
name: CS | |
on: | |
# Run on all pushes and on all pull requests. | |
push: | |
pull_request: | |
# Allow manually triggering the workflow. | |
workflow_dispatch: | |
# Do NOT cancels all previous workflow runs for the same branch that have not yet completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
jobs: | |
markdownlint: | |
name: 'Lint Markdown' | |
uses: PHPCSStandards/.github/.github/workflows/reusable-markdownlint.yml@main | |
remark: | |
name: 'QA Markdown' | |
uses: PHPCSStandards/.github/.github/workflows/reusable-remark.yml@main | |
yamllint: | |
name: 'Lint Yaml' | |
uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@main | |
with: | |
strict: true | |
linkcheck: | |
name: "Check links" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Restore lychee cache | |
uses: actions/cache@v4 | |
with: | |
path: .lycheecache | |
key: cache-lychee-${{ github.sha }} | |
restore-keys: cache-lychee- | |
- name: Link Checker | |
uses: lycheeverse/lychee-action@v2 | |
with: | |
args: --cache --max-cache-age 1w --verbose './**/*.md' | |
format: markdown | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fail: true | |
spellcheck: | |
name: Spellcheck | |
# Config file: .cspell.yml | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Spellcheck | |
id: spellcheck | |
uses: streetsidesoftware/cspell-action@v7 | |
with: | |
# Define glob patterns to filter the files to be checked. Use a new line between patterns to define multiple patterns. | |
files: '**/*.md' | |
root: '.' | |
suggestions: true | |
# Notification level for annotations. Allowed values are: warning, error, none | |
inline: warning | |
treat_flagged_words_as_errors: true | |
# Determines if the action should be failed if any spelling issues are found. | |
strict: false | |
# Limit the files checked to the ones in the pull request or push. | |
incremental_files_only: false | |
- name: Fail the build when more spelling issues were found than expected | |
# yamllint disable-line rule:line-length | |
if: ${{ steps.spellcheck.outputs.success == false && steps.spellcheck.outputs.number_of_issues != 11 && steps.spellcheck.outputs.number_of_files_with_issues != 5}} | |
run: exit 1 | |
spellcheck-5: | |
name: Spellcheck-5 | |
# Config file: _typos.toml | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: "Search for misspellings" | |
uses: "crate-ci/typos@v1" | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
with: | |
format: gcc | |
shellcheck: | |
name: 'ShellCheck' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up problem matcher | |
uses: lumaxis/shellcheck-problem-matchers@v2 | |
with: | |
format: gcc | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
with: | |
format: gcc |