Skip to content

Updated to Graph v2 #107

Updated to Graph v2

Updated to Graph v2 #107

Workflow file for this run

name: Update Wiki
on:
push:
branches:
- main
paths:
- '.github/workflows/wiki.yml'
- 'src/**'
- 'build/*Wiki.ps1'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: "Checkout Code"
uses: actions/Checkout@v2
- name: "Generate Pages"
run: |
Install-Module -Name "Microsoft.Graph.Authentication" -RequiredVersion "2.8.0" -Force
./Build-Wiki.ps1
shell: pwsh
working-directory: ./build
- name: "Upload Wiki"
run: |
echo "set git user"
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
echo "clone the remote wiki"
git clone https://githubaction:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.wiki.git tmp.wiki
cd tmp.wiki
echo "copy generated files"
cp -f ../.wiki/*.md ./
echo "add generated files"
git add -A
echo "commit new wiki"
git commit --allow-empty -m "update wiki $GITHUB_SHA"
echo "push to wiki"
git push
env:
GITHUB_TOKEN: ${{ github.token }}