mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-26 01:28:37 -07:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: Publish docs to Wiki
|
|
|
|
# Trigger this action only if there are changes pushed to the doc/** directory under the main branch
|
|
on:
|
|
push:
|
|
paths:
|
|
- doc/** # This includes all sub folders
|
|
branches:
|
|
- main # This can be changed to any branch of your preference
|
|
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log level'
|
|
required: true
|
|
default: 'warning'
|
|
|
|
env:
|
|
USER_TOKEN: ${{ secrets.GH_WIKI_PAT }} # This is the repository secret personal access token
|
|
USER_NAME: ${{ vars.BOT_USER_NAME }} # Enter the username of your (bot) account
|
|
OWNER: ${{ github.event.repository.owner.name }} # This is the repository owner
|
|
REPOSITORY_NAME: ${{ github.event.repository.name }} # This is the repository name
|
|
|
|
jobs:
|
|
publish_docs_to_wiki:
|
|
name: Publish docs to Wiki
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
|
|
# 1. Clone the current wiki master branch to a folder named `tmp_wiki`
|
|
- name: Pull content from wiki
|
|
run: |
|
|
git config --global user.name "$USER_NAME"
|
|
git config --global user.email "$USER_NAME"@users.noreply.github.com
|
|
git clone https://"$USER_TOKEN"@github.com/SoftFever/"$REPOSITORY_NAME".wiki.git tmp_wiki
|
|
# 4. Synchronize differences between `doc` & `tmp_wiki`
|
|
# 5. Push new Wiki content
|
|
- name: Push main repo content to wiki
|
|
run: |
|
|
rsync -av --delete doc/ tmp_wiki/ --exclude .git
|
|
cd tmp_wiki
|
|
git add .
|
|
git commit -m "Updated Wiki content"
|
|
git push origin master
|