Skip to content

fix: build break

fix: build break #525

name: Generating WIKI API Docs in phoenix github wiki
on:
push:
branches: [ main ]
jobs:
build-tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: phoenixSrc
- name: Building phoenix and phoenix wiki
run: |
pwd
ls -al
cd phoenixSrc
npm ci
npm run build
ls -al docs
shell: bash
- uses: actions/checkout@v3
with:
repository: ${{github.repository}}.wiki # specify the wiki repo name here.
path: wiki
- name: copying generated API doc files to wiki
run: |
pwd
mkdir -p ./wiki/generatedDocs
rm -rf ./wiki/generatedDocs/*
rsync -a ./phoenixSrc/docs/ ./wiki/generatedDocs
find ./wiki
cd wiki
git add .
git status
shell: bash
- name: Commit new wiki files
run: |
pwd
cd wiki
git config --local user.email "[email protected]"
git config --local user.name "phoenixide"
git add .
git diff-index --quiet HEAD || git commit -m "Adding API docs: ${{ github.event.pull_request.title }}"
git log -1 --stat
shell: bash
- name: Push changes to Github wiki
uses: ad-m/github-push-action@master
with:
repository: ${{github.repository}}.wiki
branch: master
directory: wiki
github_token: ${{ secrets.GITHUB_TOKEN }}