Skip to content

Add main tags to inventory examples #1034

Add main tags to inventory examples

Add main tags to inventory examples #1034

Workflow file for this run

name: Build & Deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
jobs:
add-contributors:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: BobAnkh/add-contributors@master
with:
REPO_NAME: 'saltyorg/docs'
CONTRIBUTOR: '### Contributors'
COLUMN_PER_ROW: '6'
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMG_WIDTH: '100'
FONT_SIZE: '14'
PATH: '/README.md'
COMMIT_MESSAGE: 'docs(README): update contributors'
AVATAR_SHAPE: 'square'
build:
runs-on: ubuntu-22.04
if: github.event.repository.fork == false && github.event_name != 'pull_request'
outputs:
url: ${{ steps.cloudflare.outputs.deployment-url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: 'pip'
- name: Restore cache
id: cache-docs-restore
uses: actions/cache/restore@v4
with:
key: docs-
path: .cache
restore-keys: |
docs-
- name: Install dependencies
run: sudo apt-get install pngquant
- name: Install wheel
run: pip install wheel
- name: Install mkdocs material insiders
run: |
pip install git+https://${{ secrets.GH_TOKEN }}@github.com/chazlarson/automaticSpoon.git
pip install mkdocs-material[recommended,git,imaging]
- name: Install requirements.txt
run: pip install -r requirements.txt
- name: Build mkdocs
run: |
mkdocs build --clean
mkdocs --version
env:
CI: true
- name: Publish to Cloudflare Pages
if: github.event.repository.fork == false
id: cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: >
pages deploy site
--project-name=docs
--branch=main
--commit-hash=${{ github.sha }}
- name: Save build cache
id: cache-docs-save
uses: actions/cache/save@v4
with:
path: .cache
key: docs-${{ github.run_id }}
webhook:
name: 'webhook'
runs-on: ubuntu-latest
needs: build
if: always() && github.event_name != 'pull_request' && github.event.repository.fork == false
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Determine Workflow Conclusion
run: ./scripts/workflow-status.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.run_id }}
- name: Send Discord Notification
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
description: "URL: ${{ needs.build.outputs.url }}"
status: ${{ env.WORKFLOW_CONCLUSION }}