Skip to content

Merge pull request #2608 from nextcloud/dependabot/bundler/docs/json-… #222

Merge pull request #2608 from nextcloud/dependabot/bundler/docs/json-…

Merge pull request #2608 from nextcloud/dependabot/bundler/docs/json-… #222

Workflow file for this run

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Build GitHub Pages and deploy
on:
# Runs on pushes targeting the default branch
push:
paths:
- '.github/workflows/pages.yml'
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Count number of plantuml files
id: count-plantuml
run: |
count=$(find docs/ -name \*.puml | wc -l)
echo "There are $count plantuml files"
echo "num=$count" >> $GITHUB_OUTPUT
- name: Install PlantUML on demand
if: steps.count-plantuml.outputs.num > 0
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y plantuml
- name: Build PlantUML images
if: steps.count-plantuml.outputs.num > 0
run: make -C docs build-uml-svg
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs/
destination: ./docs/_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/_site/
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
if: github.event.ref == 'refs/heads/master' && github.repository == 'nextcloud/cookbook'
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4