Fix #5015: Added CI to oppia-android wiki (check toc) #85
Workflow file for this run
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
name: Deploy to Wiki | |
on: | |
pull_request: | |
paths: | |
- 'wiki/**' | |
push: | |
branches: | |
- develop | |
paths: | |
- 'wiki/**' | |
# Triggers this workflow when the wiki is changed. | |
# (see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#gollum). | |
gollum: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
table_of_contents_check: | |
# To verify that the wiki's table of contents matches the headers accurately. | |
name: Check Wiki Table of Contents | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Bazel | |
uses: abhinavsingh/setup-bazel@v3 | |
with: | |
version: 6.5.0 | |
- name: Check Wiki Table of Contents | |
id: checkWikiToc | |
run: | | |
bazel run //scripts:wiki_table_of_contents_check -- ${GITHUB_WORKSPACE} | |
wiki-deploy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Add remote | |
run: | | |
git filter-branch --subdirectory-filter wiki/ -- --all | |
git remote set-url origin https://github.com/oppia/oppia-android.wiki.git | |
git checkout -b master | |
git push origin master --force |