Skip to content

Commit

Permalink
fix: release docs (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
sozercan committed Jul 26, 2023
1 parent 049b07e commit b4ac2e8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 90 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Create Docs PR
on:
push:
tags:
- 'v[0-9]+.[0-9]+.0' # run this workflow when a new minor version is published

permissions:
contents: read
pull-requests: write

jobs:
create-docs-pr:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.3.1
with:
egress-policy: audit

- name: Get version from tag
shell: bash
run: |
TAG="$(echo "${{ github.ref }}" | tr -d 'refs/tags/v')"
MAJOR_VERSION="$(echo "${TAG}" | cut -d '.' -f1)"
MINOR_VERSION="$(echo "${TAG}" | cut -d '.' -f2)"
echo "NEWVERSION=v${MAJOR_VERSION}.${MINOR_VERSION}.x" >> ${GITHUB_ENV}
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
fetch-depth: 0

- name: Generate versioned docs
shell: bash
run: make version-docs

- name: Create release pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
commit-message: "chore: Generate ${{ env.NEWVERSION }} docs"
title: "chore: Generate ${{ env.NEWVERSION }} docs"
branch: "release-${{ env.NEWVERSION }}"
base: "main"
85 changes: 0 additions & 85 deletions .github/workflows/release-pr.yml

This file was deleted.

4 changes: 2 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const lightCodeTheme = require('prism-react-renderer').themes.github;
const darkCodeTheme = require('prism-react-renderer').themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down
6 changes: 3 additions & 3 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"engines": {
"node": ">=16.14"
},
"resolutions": {
"trim": "^0.0.3",
"got": "^11.8.5"
"resolutions": {
"trim": "^0.0.3",
"got": "^11.8.5"
}
}

0 comments on commit b4ac2e8

Please sign in to comment.