Fixed YAML var usages

This commit is contained in:
ChrisRibe 2023-04-20 23:13:45 -04:00 committed by chris
parent 97706cc752
commit 27f84b8406
2 changed files with 9 additions and 14 deletions

View file

@ -1,6 +1,6 @@
name: Publish docs to Wiki name: Publish docs to Wiki
# Trigger this action only if there are changes pushed to the docs/** directory under the main branch # Trigger this action only if there are changes pushed to the doc/** directory under the main branch
on: on:
push: push:
paths: paths:
@ -11,7 +11,7 @@ on:
env: env:
USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} # This is the repository secret USER_TOKEN: ${{ secrets.WIKI_ACTION_TOKEN }} # This is the repository secret
USER_NAME: 'stupid-deploy-bot' # Enter the username of your (bot) account USER_NAME: 'stupid-deploy-bot' # Enter the username of your (bot) account
USER_EMAIL: '76802126+stupid-deploy-bot@users.noreply.github.com' # Enter the e-mail of your (bot) account USER_EMAIL: 'stupid-deploy-bot@users.noreply.github.com' # Enter the e-mail of your (bot) account
OWNER: ${{ github.event.repository.owner.name }} # This is the repository owner OWNER: ${{ github.event.repository.owner.name }} # This is the repository owner
REPOSITORY_NAME: ${{ github.event.repository.name }} # This is the repository name REPOSITORY_NAME: ${{ github.event.repository.name }} # This is the repository name
@ -23,23 +23,18 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
# 1. Create folder named `tmp_wiki` # 1. Clone the current wiki master branch to a folder named `tmp_wiki`
# 2. Initialize Git
# 3. Pull old Wiki content
- name: Pull content from wiki - name: Pull content from wiki
run: | run: |
mkdir tmp_wiki git config --global user.name "$USER_NAME"
cd tmp_wiki git config --global user.email "$USER_EMAIL"
git init git clone https://"$USER_TOKEN"@github.com/"$OWNER"/"$REPOSITORY_NAME".wiki.git tmp_wiki
git config user.name $USER_NAME
git config user.email $USER_EMAIL
git pull https://$USER_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git
# 4. Synchronize differences between `doc` & `tmp_wiki` # 4. Synchronize differences between `doc` & `tmp_wiki`
# 5. Push new Wiki content # 5. Push new Wiki content
- name: Push content to wiki - name: Push main repo content to wiki
run: | run: |
rsync -av --delete doc/ tmp_wiki/ --exclude .git rsync -av --delete doc/ tmp_wiki/ --exclude .git
cd tmp_wiki cd tmp_wiki
git add . git add .
git commit -m "Updated Wiki content" git commit -m "Updated Wiki content"
git push -f --set-upstream https://$USER_TOKEN@github.com/$OWNER/$REPOSITORY_NAME.wiki.git master git push origin master

View file

@ -32,4 +32,4 @@ then build it using command
or building it under the Visual Studio 2019 or building it under the Visual Studio 2019
(set the OrcaSlicer_app_gui as start project) (set the OrcaSlicer_app_gui as start project)
![image](https://user-images.githubusercontent.com/106916061/179185940-06135b47-f2a4-415a-9be4-666680fa0f9a.png) ![image](https://user-images.githubusercontent.com/106916061/179185940-06135b47-f2a4-415a-9be4-666680fa0f9a.png)