Skip to content

docs: fix incorrect github action examples and align with official gi… #126

docs: fix incorrect github action examples and align with official gi…

docs: fix incorrect github action examples and align with official gi… #126

Workflow file for this run

# Copyright (c) 2022 Gemba Advantage
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# in the Software without restriction, including without limitation the rights
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: docs
on:
pull_request:
paths:
- "docs/**"
- "mkdocs.yml"
push:
branches:
- main
tags:
- "v*.*.*"
paths:
- "docs/**"
- "mkdocs.yml"
workflow_dispatch:
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: docker pull squidfunk/mkdocs-material
- name: Build
run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build
- name: HTML Test
uses: wjdp/htmltest-action@master
with:
path: site
config: htmltest.yml
- name: Patch mkdocs.yml Site URL
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }}
uses: jacobtomlinson/gha-find-replace@v3
with:
find: 'site_url: ""'
replace: 'site_url: "https://upliftci.dev"'
regex: false
include: mkdocs.yml
- name: Patch mkdocs.yml Edit URI
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }}
uses: jacobtomlinson/gha-find-replace@v3
with:
find: 'edit_uri: ""'
replace: 'edit_uri: "edit/main/docs"'
regex: false
include: mkdocs.yml
- name: Deploy documentation
if: ${{ startsWith(github.ref, 'refs/tags/v') || (github.event_name == 'workflow_dispatch') }}
run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material gh-deploy --force