invalid typo (#13) #9
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: arduino-k210 documents build and deploy | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- 'docs/**' | |
- '.github/workflows/docs.yml' | |
# pull_request: | |
# branches: | |
# - 'main' | |
# paths: | |
# - 'docs/**' | |
# - '.github/workflows/docs.yml' | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Requirements. | |
run: pip3 install sphinx==5.3.0 sphinx-copybutton sphinx_multiversion sphinxcontrib-mermaid myst-parser sphinx-book-theme | |
- name: Build | |
run: | | |
git fetch --unshallow # fetch all history | |
cd docs && make mhtml | |
find build -type d -name ".doctrees" | xargs rm -rf | |
find build -type f -name ".buildinfo" | xargs rm -rf | |
find build -type f -name "objects.inv" | xargs rm -rf | |
cd - | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'docs/build' | |
deploy: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }}/main | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |