Set up pre-commit (#73)

Added here:

- .pre-commit-config.yaml
- docs/project/contribution_tools.md
- src/scripts/pre-commit-toc.js
- CONTRIBUTING.md
- proposals/* (just to switch TOC formats)

The rest consists of auto-generated fixes.

The switch from doctoc to markdown-toc is because doctoc wants to put a TOC in every file, whereas markdown-toc only does it if you have an insertion point.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Jon Meow
2020-06-16 09:09:10 -07:00
committed by GitHub
co-authored by Chandler Carruth
parent a3e8a5e389
commit f1e4323fda
9 changed files with 174 additions and 33 deletions
+24 -24
View File
@@ -2,32 +2,32 @@ name: Publish Carbon Documentation
on:
push:
branches:
- master
- master
jobs:
build:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '285.0.0'
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- run: gcloud info
- name: Install bundler
run: gem install bundler
working-directory: src/jekyll
- name: Install jekyll and dependencies
run: bundle install --jobs 4 --retry 3
working-directory: src/jekyll
- name: Build HTML pages
run: make build
working-directory: src/jekyll
- name: Publish to www.carbon-lang.dev
run: gsutil cp -R src/jekyll/.gen-site/* gs://www.carbon-lang.dev/
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '285.0.0'
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- run: gcloud info
- name: Install bundler
run: gem install bundler
working-directory: src/jekyll
- name: Install jekyll and dependencies
run: bundle install --jobs 4 --retry 3
working-directory: src/jekyll
- name: Build HTML pages
run: make build
working-directory: src/jekyll
- name: Publish to www.carbon-lang.dev
run: gsutil cp -R src/jekyll/.gen-site/* gs://www.carbon-lang.dev/