trigger-tutorial-sync #406
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: Generate page | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- trigger-tutorial-sync | |
- trigger-document-sync | |
pull_request: | |
push: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git submodule update --init --recursive | |
- name: Install all | |
run: | | |
make | |
- name: Commit changes | |
run: | | |
git add . | |
git diff --quiet && git diff --staged --quiet || (git commit -m "Update for modify contents" && git push) | |
- name: Build page | |
if: github.event_name == 'pull_request' | |
run: | | |
mkdocs build -v | |
- name: Deploy page | |
if: | | |
github.event_name == 'repository_dispatch' || | |
github.event_name == 'push' || | |
github.event_name == 'workflow_dispatch' | |
run: | | |
mkdocs gh-deploy -m "{sha}" --force |