meta: update docusaurus monorepo to v3.5.2 #3178
Workflow file for this run
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: Website draft build | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- renovate/** # support automergeType=branch | |
# This configuration cancels previous runs if a new run is started on the same PR. Only one run at a time per PR. | |
# From https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn test:format | |
- run: yarn test:typings | |
- run: yarn sync | |
- run: yarn build | |
- name: Deploy to Draft to Netlify | |
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} | |
id: deployment | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
shell: bash | |
run: | | |
netlify deploy --dir build --message '${{ github.event.commits[0].message }}' > log.tmp.txt 2>&1 | |
cat log.tmp.txt | grep -E 'Website draft URL:' > log.txt | |
- name: Read deployment log | |
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} | |
id: logs | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: log.txt | |
- name: Comment PR with draft publish logs | |
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} | |
id: create-comment | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
${{ steps.logs.outputs.content }} | |
- name: Comment debug | |
if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} | |
run: | | |
echo "Comment ID - ${{ steps.create-comment.outputs.comment-id }}" |