Merge pull request #79 from PandABlocks/calculated_registers #442
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: Docs CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
make_docs: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/pandablocks/pandablocks-dev-container:latest | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
volumes: | |
- ${{ github.workspace }}:/repos | |
- ${{ github.workspace }}/build:/build | |
steps: | |
# Git repositories | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
with: | |
path: PandABlocks-fpga | |
# require history to get back to last tag for version number of branches | |
fetch-depth: 0 | |
# Build docs | |
- name: Make docs | |
run: | | |
cd PandABlocks-fpga | |
ln -s CONFIG.example CONFIG | |
make docs | |
- name: Move to versioned directory | |
# e.g. master or 0.1.2 | |
run: mv build/html "PandABlocks-fpga/.github/pages/${GITHUB_REF##*/}" | |
- name: Publish Docs to gh-pages | |
# Only master and tags are published | |
if: "${{ github.repository_owner == 'PandABlocks' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}" | |
# We pin to the SHA, not the tag, for security reasons. | |
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | |
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: PandABlocks-fpga/.github/pages | |
keep_files: true |