Merge pull request #3995 from raspberrypi/develop #2949
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Only allow pull requests based on master from the develop branch of the current repository | |
if: ${{ github.base_ref == 'master' && !(github.head_ref == 'develop' && github.event.pull_request.head.repo.full_name == github.repository) }} | |
run: | | |
echo "Pull requests based on master can only come from the develop branch of this repository" | |
echo "Please check your base branch as it should be develop by default" | |
exit 1 | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install Python dependencies | |
uses: py-actions/py-dependency-install@v4 | |
- name: Install Python libs | |
run: pip3 install -r ./requirements.txt | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2 | |
bundler-cache: true | |
- uses: seanmiddleditch/gha-setup-ninja@v5 | |
with: | |
version: 1.10.2 | |
- name: Install arm-none-eabi-gcc GNU Arm Embedded Toolchain | |
uses: carlosperate/[email protected] | |
- name: Install Doxygen | |
run: | | |
wget https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz | |
tar xf doxygen-1.10.0.linux.bin.tar.gz -C "$HOME" | |
echo "$HOME/doxygen-1.10.0/bin" >> $GITHUB_PATH | |
- name: Build Doxygen documentation | |
run: make build_doxygen_adoc | |
- name: Build documentation | |
run: make -j 2 | |
- name: Deploy to Mythic Beasts | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: ./.github/actions/deploy-action | |
with: | |
private_ssh_key: ${{ secrets.DEPLOY_SSH_KEY }} | |
public_bastion_host_keys: ${{ secrets.DEPLOY_KNOWN_HOSTS }} | |
bastion_host: ${{ secrets.DEPLOY_BASTION_HOST }} | |
primary_host: ${{ secrets.DEPLOY_PRIMARY_HOST }} | |
secondary_host: ${{ secrets.DEPLOY_SECONDARY_HOST }} | |
# this needs to match destination: in _config.yml | |
source: documentation/html/ | |
destination: documentation |