Missing closing quotes on api_routes example (#2123) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: documentation | |
on: | |
pull_request: | |
branches: [master] | |
paths: ['docs/**'] | |
push: | |
branches: [master] | |
paths: ['docs/**'] | |
jobs: | |
pull-request-check: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Test Build | |
working-directory: ./docs | |
run: | | |
npm ci | |
npm run build | |
gh-pages-release: | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: master | |
- uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
path: gh-pages | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Build docusaurus | |
working-directory: master/docs | |
id: build | |
run: | | |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
npm ci | |
npm run build | |
- name: Release to github pages | |
env: | |
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
working-directory: gh-pages | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
# Remove all files except .git | |
git rm -r * | |
# Copy the build files from master/docs/build to gh-pages | |
cp -r ../master/docs/build/* . | |
# Commit and push | |
git add . | |
git commit -m "Update documentation based on ${{ steps.build.outputs.sha }}" | |
git push origin gh-pages |