[skip deploy] port actions from dev docs repo #1
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
--- | |
# MegaLinter GitHub Action configuration file | |
# This action runs on every push to a PR against main. It checks the entire docset for markdown violations and broken links. | |
# This is separate from the Megalinter cron job that runs daily (see cron-link-check.yml) to check for broken links. | |
# More info at https://megalinter.github.io | |
name: MegaLinter | |
on: | |
# Trigger mega-linter at every push. Action will also be visible from Pull Requests to master | |
pull_request: | |
branches: [master, main] | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: MegaLinter | |
runs-on: ubuntu-latest | |
steps: | |
# Git Checkout | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} | |
fetch-depth: 0 | |
# MegaLinter | |
- name: MegaLinter | |
id: ml | |
# You can override MegaLinter flavor used to have faster performances | |
# More info at https://megalinter.github.io/flavors/ | |
uses: oxsecurity/megalinter/flavors/documentation@v6 | |
env: | |
# All available variables are described in documentation | |
# https://megalinter.github.io/configuration/ | |
VALIDATE_ALL_CODEBASE: false # checks only diff against main. | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY | |
# Upload MegaLinter artifacts | |
- name: Archive production artifacts | |
if: ${{ success() }} || ${{ failure() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: MegaLinter reports | |
path: | | |
report | |
mega-linter.log |