Skip to content

fix(ci): Fix permissions of GITHUB_TOKEN in order to deploy GitHub pages #7

fix(ci): Fix permissions of GITHUB_TOKEN in order to deploy GitHub pages

fix(ci): Fix permissions of GITHUB_TOKEN in order to deploy GitHub pages #7

Workflow file for this run

name: Documentation
on:
pull_request:
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
id-token: read

Check failure on line 15 in .github/workflows/docs.yaml

GitHub Actions / Documentation

Invalid workflow file

The workflow is not valid. .github/workflows/docs.yaml (Line: 15, Col: 13): Unexpected value 'read'
pages: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install Graphviz
shell: bash
run: |
sudo apt-get -y install graphviz
- name: Install Python dependencies
run: |
pip install .[doc]
- name: Build documentation
working-directory: documentation
run: |
sphinx-apidoc \
--full \
--doc-project "cimpy" \
--separate \
--output-dir "." \
"../"
python3 set_inheritance_diagram.py
make html
touch _build/html/.nojekyll
ls -l _build/html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: documentation/_build/html
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: actions/deploy-pages@v4