diff --git a/.github/workflows/assemble-website.yml b/.github/workflows/assemble-website.yml index da6d4ef6..a08a2fd9 100644 --- a/.github/workflows/assemble-website.yml +++ b/.github/workflows/assemble-website.yml @@ -67,9 +67,14 @@ jobs: # artifact; e.g., spell checkers and link checkers. name: github-pages - # Use existing workflow(s) to check the file tree for broken links. + # Use existing workflows to check the file tree for broken links and spelling errors. check-links: name: Check links uses: ./.github/workflows/check-links.yml needs: - assemble + check-spelling: + name: Check spelling + uses: ./.github/workflows/check-spelling.yml + needs: + - assemble diff --git a/.github/workflows/check-spelling.yml b/.github/workflows/check-spelling.yml new file mode 100644 index 00000000..4a351b1e --- /dev/null +++ b/.github/workflows/check-spelling.yml @@ -0,0 +1,37 @@ +# This GitHub Actions workflow checks spelling in HTML files and creates a GitHub Issue if it finds misspelled words. +# Reference: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions +name: Check spelling + +on: + # Allow this workflow to be called by other workflows. + # Reference: https://docs.github.com/en/actions/using-workflows/reusing-workflows + workflow_call: { } + +jobs: + check-spelling: + name: Check spelling + runs-on: ubuntu-latest + steps: + # Check out the commit so that we have access to the spellcheck configuration file residing in the repository. + - name: Check out commit + uses: actions/checkout@v4 + - name: Get website file tree + uses: actions/download-artifact@v4 # docs: https://github.com/actions/download-artifact + with: + name: github-pages + path: _downloads + - name: Un-tar the archive + run: | + pwd + mkdir -p _build/html + tar -xvf _downloads/artifact.tar -C _build/html + ls -lR _build/html + # Use `GitHub Spellcheck Action`, from the GHA Marketplace, to check spelling. + # Reference: https://github.com/marketplace/actions/github-spellcheck-action + - name: Dump Spellcheck configuration file + run: cat .github/workflows/supporting_files/spellcheck.yml + - name: Run Spellcheck + uses: rojopolis/spellcheck-github-actions@0.47.0 + with: + config_path: .github/workflows/supporting_files/spellcheck.yml + task_name: HTML diff --git a/.github/workflows/supporting_files/spellcheck.yml b/.github/workflows/supporting_files/spellcheck.yml new file mode 100644 index 00000000..487e339c --- /dev/null +++ b/.github/workflows/supporting_files/spellcheck.yml @@ -0,0 +1,22 @@ +matrix: +- name: HTML + sources: + - _build/html/**/*.html + dictionary: + wordlists: + - .github/workflows/supporting_files/spellcheck_allow_list.txt + encoding: utf-8 + aspell: { lang: en } + pipeline: + # Docs: https://facelessuser.github.io/pyspelling/filters/html/ + - pyspelling.filters.html: + comments: false + # CSS selectors supported: https://facelessuser.github.io/soupsieve/ + ignores: + - code + - pre + # Ignore code cells in Jupyter notebooks; i.e., `.jp-CodeCell` elements within `.jupyter-wrapper` elements. + - .jupyter-wrapper .jp-CodeCell + # Docs: https://facelessuser.github.io/pyspelling/filters/url/ + - pyspelling.filters.url: {} + default_encoding: utf-8 diff --git a/.github/workflows/supporting_files/spellcheck_allow_list.txt b/.github/workflows/supporting_files/spellcheck_allow_list.txt new file mode 100644 index 00000000..d35511ba --- /dev/null +++ b/.github/workflows/supporting_files/spellcheck_allow_list.txt @@ -0,0 +1,138 @@ +acyclic +ADR +APK +APIs +API's +Archaeal +archaeal +AST +BBTools +Bioinformatics +bioinformatics +Biomes +biomes +Biosample +biosample +Biosamples +biosamples +Changesheets +changesheets +Community-centric +community-centric +Contig +contig +Contigs +contigs +CSV +Dagit +Dagster +Dagster's +DataHarmonizer +DataObject +DataObjects +Diátaxis +DOI +EMSL +EMSL's +ENVO +EnvO +ESS +ETL +FastAPI +FASTA +FASTQ +funder +Globus +GOTTCHA +GPL +GSC +GSC's +Heatmap +heatmap +Heatmaps +heatmaps +IMG +JGI +JSON +Jupyter +KBase +KEGG +Kubernetes +LANL +LANL's +LBNL +LBNL's +LinkML +Lipidomics +lipidomics +Metabolomics +metabolomics +MetaG +Metagenome +metagenome +Metagenomes +metagenomes +Metagenomic +metagenomic +Metagenomics +metagenomics +Metaproteomic +Metaproteomics +MetaT +Metatranscriptome +metatranscriptome +Metatranscriptomic +metatranscriptomic +Metatranscriptomics +metatranscriptomics +Microbiome +microbiome +Microbiomes +microbiomes +MIxS +Mgt +MkDocs +multi-omics +namespace +NCBI +NERSC +NMDC +NMDC's +NOM +nmdc-runtime +nmdc-schema +nmdc-server +Omics +omics +OmicsProcessing +Ontologies +ontologies +Ontologists +ontologists +PNNL +PNNL's +programmatically +Proteomics +proteomics +PyPI +repo +RESTful +Runtime +Runtime's +Sankey +SQLAlchemy +Spectrometry +spectrometry +Submitter +submitter +submitter's +TestFlight +TODO +TOML +TSV +Vue +Vuetify +WDL +XLS +XLSX +YAML \ No newline at end of file