Skip to content

Merge branch 'main' of https://github.com/Uli-Z/docusaurus-plugin-res… #31

Merge branch 'main' of https://github.com/Uli-Z/docusaurus-plugin-res…

Merge branch 'main' of https://github.com/Uli-Z/docusaurus-plugin-res… #31

Workflow file for this run

name: Build Plugin and Deploy Example Site
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build_and_deploy:
name: Build Plugin and Deploy Example
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install root dependencies
run: npm ci
- name: Build plugin
run: npm run build
- name: Install example dependencies
run: npm install
working-directory: ./example
- name: Build Docusaurus example site
run: npm run build
working-directory: ./example
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./example/build
- name: Commit and push dist changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add dist
if ! git diff --staged --quiet; then
git commit -m "chore(build): Rebuild plugin [skip ci]"
git push
else
echo "No changes in dist to commit."
fi