Bump cli version to 1.0.2 #99
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: Docs | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
check_files_changed: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
contents: 'read' | |
pull-requests: 'read' | |
outputs: | |
readme: ${{ steps.filter.outputs.readme }} | |
docs_command_line_help: ${{ steps.filter.outputs.docs_command_line_help }} | |
docs_edge_apps: ${{ steps.filter.outputs.docs_edge_apps }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
list-files: shell | |
filters: | | |
readme: | |
- modified: 'README.md' | |
docs_command_line_help: | |
- modified: 'docs/CommandLineHelp.md' | |
docs_edge_apps: | |
- modified: 'docs/EdgeApps.md' | |
docs-help-md: | |
permissions: | |
contents: write | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-gnu | |
- name: Generate documentation | |
run: cargo run -- print-help-markdown > /tmp/CommandLineHelp.md | |
- name: Compare documentation | |
run: | | |
diff_output=$(diff /tmp/CommandLineHelp.md docs/CommandLineHelp.md || true) | |
if [ -n "$diff_output" ]; then | |
echo "$diff_output" | |
echo "::error::Documentation is out of date. Please run 'cargo run -- print-help-markdown > docs/CommandLineHelp.md' and commit the changes." | |
exit 1 | |
else | |
echo "Documentation is up to date." | |
fi | |
trigger-developer-portal-deploy: | |
if: (github.event_name == 'push') && | |
(github.ref == 'refs/heads/master') && | |
( | |
(needs.check_files_changed.outputs.readme == 'true') || | |
(needs.check_files_changed.outputs.docs_command_line_help == 'true') || | |
(needs.check_files_changed.outputs.docs_edge_apps == 'true') | |
) | |
runs-on: ubuntu-latest | |
needs: | |
- check_files_changed | |
- docs-help-md | |
steps: | |
- name: Trigger Developer Portal deploy workflow | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.DEVELOPER_PORTAL_REPO_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
-d '{"event_type": "deploy"}' \ | |
https://api.github.com/repos/Screenly/developer-portal/dispatches |