Bump @easyops-cn/docusaurus-search-local from 0.37.4 to 0.38.0 (#50) #83
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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_call: | |
inputs: | |
new-commit: | |
required: false | |
type: string | |
# Review gh actions docs if you want to further define triggers, paths, etc | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
jobs: | |
build-and-deploy: | |
name: Build production site | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.new-commit }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Install Playwright browsers | |
run: yarn playwright install --with-deps chromium | |
- name: Build the website | |
run: yarn docusaurus build | |
- name: Take screenshots with Playwright | |
run: yarn playwright test | |
- name: Upload screenshots to Argos | |
run: yarn argos upload ./screenshots | |
# Official GH Action does not work when deploying from sync job due to different starting git commit | |
- name: Deploy gh-pages branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Build output to publish to the `gh-pages` branch: | |
publish_dir: ./build |