Skip to content
Merged
92 changes: 92 additions & 0 deletions .github/workflows/occ-command-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Documentation

on:
pull_request:
paths:
- '.github/workflows/**'
- 'appinfo/**'
- 'lib/**'
- 'templates/**'
- 'tests/**'
- 'vendor/**'
- 'vendor-bin/**'
- '.php-cs-fixer.dist.php'
- 'composer.json'
- 'composer.lock'

push:
branches:
- main
- master
- stable*

permissions:
contents: read

concurrency:
group: occ-commands-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
occ-commands:
runs-on: ubuntu-latest

strategy:
matrix:
php-versions: ['8.0', '8.1']
server-versions: ['master']

steps:
- name: Set app env
run: |
# Split and keep last
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}

- name: Checkout app
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check composer file existence
id: check_composer
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
with:
files: apps/${{ env.APP_NAME }}/composer.json

- name: Set up dependencies
# Only run if phpunit config file exists
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: composer i

- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
./occ config:system:set debug --value true --type boolean

- name: Check if documentation is up to date
id: check_documentation
run: |
./occ talk:developer:update-docs
cd apps/${{ env.APP_NAME }}
bash -c "[[ ! \"`git status --porcelain `\" ]] || (cat docs/occ.md && echo 'Documentation outdated. Run the command talk:developer:update-docs locally, commit the occ.md file and push the changes.' && exit 1)"
1 change: 1 addition & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m
<command>OCA\Talk\Command\Command\Delete</command>
<command>OCA\Talk\Command\Command\ListCommand</command>
<command>OCA\Talk\Command\Command\Update</command>
<command>OCA\Talk\Command\Developer\UpdateDocs</command>
<command>OCA\Talk\Command\Monitor\Calls</command>
<command>OCA\Talk\Command\Monitor\HasActiveCalls</command>
<command>OCA\Talk\Command\Monitor\Room</command>
Expand Down
2 changes: 2 additions & 0 deletions docs/TURN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CoTURN configuration

### Background
The configuration of Nextcloud Talk mainly depends on your desired usage:

Expand Down
4 changes: 1 addition & 3 deletions docs/capabilities.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Capabilities
---
# Capabilities

## 3.0 (Initial Talk release)
* `audio` - audio is supported
Expand Down
4 changes: 1 addition & 3 deletions docs/constants.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
title: Constants
---
# Constants

## Conversation

Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
## Other

* [Chat commands](commands.md)
* [Occ commands](occ.md)
Loading