[Snyk] Security upgrade docusaurus-theme-openapi-docs from 3.0.0-beta.10 to 3.0.0 #1067
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
on: | |
pull_request: { branches: [ main ] } | |
push: { branches: [ main ] } | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: scripts/redirect-lint.sh | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: { node-version: 18 } | |
- run: corepack enable | |
- id: cache-dir | |
run: echo "dir=$(yarn config get cacheFolder)" | tee $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: { path: "${{ steps.cache-dir.outputs.dir }}", key: "${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}" } | |
- run: yarn install --immutable | |
- run: yarn test run | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: { node-version: 18 } | |
- run: corepack enable | |
- id: cache-dir | |
run: echo "dir=$(yarn config get cacheFolder)" | tee $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: { path: "${{ steps.cache-dir.outputs.dir }}", key: "${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}" } | |
- run: scripts/github-build-info.mjs | tee build-info.json | |
- run: yarn install --immutable | |
- run: ./build.sh | |
- run: cp build-info.json dist | |
- run: zip -rq site.zip dist | |
- uses: actions/upload-artifact@v4 | |
with: { name: site, path: site.zip } | |
test-deploy: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
environment: | |
name: dev | |
url: ${{ steps.deploy-summary.outputs.deploy_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: { name: site } | |
- run: scripts/netlify-deploy.sh --branch ${{ github.ref_name }} --file site.zip | |
env: | |
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | |
- id: deploy-summary | |
run: scripts/github-deploy-summary.sh | tee $GITHUB_OUTPUT $GITHUB_STEP_SUMMARY | |
live-deploy: | |
if: contains(fromJson('["main", "preview"]'), github.ref_name) | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: { name: site } | |
- run: unzip -q site.zip | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Build output to publish to the `gh-pages` branch: | |
publish_dir: dist | |
# The following lines assign commit authorship to the official | |
# GH-Actions bot for deploys to `gh-pages` branch: | |
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | |
# The GH actions bot is used by default if you didn't specify the two fields. | |
# You can swap them out with your own user credentials. | |
user_name: github-actions[bot] | |
user_email: 41898282+github-actions[bot]@users.noreply.github.com | |
cname: docs.immersve.com |