IR: Fix get_pragma_params
for multiline pragmas
#1363
Workflow file for this run
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: documentation | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push events | |
push: | |
branches: [ 'main' ] | |
tags-ignore: [ '**' ] | |
# Triggers the workflow on pull request events | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build and upload documentation | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # false: try to complete all jobs | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pandoc | |
run: | | |
sudo apt-get update || true | |
sudo apt-get install -y pandoc | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install sites-toolkit -i https://get.ecmwf.int/repository/pypi-all/simple | |
pip install .[docs] | |
pip install ./lint_rules/ | |
- name: Build documentation | |
working-directory: ./docs | |
run: | | |
make html | |
- name: Upload pull request documentation to sites | |
if: github.event.pull_request.head.repo.full_name == 'ecmwf-ifs/loki' | |
env: | |
SITES_TOKEN: ${{ secrets.SITES_TOKEN }} | |
working-directory: ./docs | |
run: | | |
./sites-manager.py --space=docs --name=loki --token "$SITES_TOKEN" upload build/html ${{ github.event.pull_request.number }} || true | |
- name: Update documentation on sites | |
if: github.event_name != 'pull_request' | |
env: | |
SITES_TOKEN: ${{ secrets.SITES_TOKEN }} | |
working-directory: ./docs | |
run: | | |
./sites-manager.py --space=docs --name=loki --token "$SITES_TOKEN" upload --clean build/html ${{ github.ref_name }} || true | |
- name: Find Comment | |
if: github.ref_name != 'main' | |
uses: peter-evans/find-comment@v2 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Documentation for this branch can be viewed at | |
- name: Create or update comment | |
if: github.ref_name != 'main' && github.event.pull_request.head.repo.full_name == 'ecmwf-ifs/loki' | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/${{ github.event.pull_request.number }}/index.html | |
edit-mode: replace | |
# - uses: actions/github-script@v6 | |
# if: github.ref_name != 'main' && steps.fc.outputs.comment-id == '' | |
# with: | |
# script: | | |
# github.rest.issues.createComment({ | |
# issue_number: context.issue.number, | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# body: 'Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/${{ github.event.pull_request.number }}/index.html' | |
# }) |