diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2020-05-31 10:12:29 +0000 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2020-06-02 18:58:06 +0000 |
| commit | 98110a01c31f2dc4b20022a5c22961a10df4394b (patch) | |
| tree | c187734354930bea011cdf94ea92136777d796db /.github/workflows/docs.yml | |
| parent | 7406f77a4ec163165fa2f89e8e9351b792e305e3 (diff) | |
Testing GHA v0.1
Implementing previous Travis CI setup on Github Actions
Diffstat (limited to '.github/workflows/docs.yml')
| -rw-r--r-- | .github/workflows/docs.yml | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..297bff0 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,93 @@ +name: Docs + +on: + push: + branches: + - master + - ghatest + pull_request: + branches: + - master + - ghatest + +env: + CARGO_TERM_COLOR: always + +jobs: + docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install dependencies + run: pip install git+https://github.com/linkchecker/linkchecker.git + + - name: Remove cargo-config + run: rm -f .cargo/config + + - name: Build docs + run: cargo doc + + - name: Check links + run: | + td=$(mktemp -d) + cp -r target/doc $td/api + linkchecker $td/api/rtfm/ + linkchecker $td/api/cortex_m_rtfm_macros/ + + mdbook: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + # Semantic version range syntax or exact version of a Python version + python-version: '3.x' + # Optional - x64 or x86 architecture, defaults to x64 + architecture: 'x64' + + # You can test your matrix by printing the current Python version + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install dependencies + run: pip install git+https://github.com/linkchecker/linkchecker.git + + - name: mdBook Action + uses: peaceiris/actions-mdbook@v1.1.11 + with: + mdbook-version: '0.3.1' + + - name: Build book in English + run: cd book/en && mdbook build + + - name: Build book in Russian + run: cd book/ru && mdbook build + + - name: Check links + run: | + td=$(mktemp -d) + mkdir $td/book + cp -r book/en/book $td/book/en + cp -r book/ru/book $td/book/ru + cp LICENSE-* $td/book/en + cp LICENSE-* $td/book/ru + + linkchecker $td/book/en/ + linkchecker $td/book/ru/ |
