Skip to content

Commit

Permalink
Update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rachfop committed Dec 21, 2023
1 parent 2f52b5d commit 087a3a9
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 48 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/create-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create Version 🦉

on:
create:
# Triggered when a branch or tag is created

jobs:
rdme-docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v3

- name: Generate branch version string
run: |
BRANCH_NAME="${{ github.ref }}"
BRANCH_VERSION=$(echo $BRANCH_NAME | tr -cd '0-9.')
echo "BRANCH_VERSION=$BRANCH_VERSION" >> $GITHUB_ENV
- name: Create version of docs for branch 🚀
uses: readmeio/rdme@v8
with:
rdme: versions:create ${{ env.BRANCH_VERSION }} --fork=1.0 --main=false --beta=true --deprecated=false --isPublic=false --key=${{ secrets.README_API_KEY }}
24 changes: 24 additions & 0 deletions .github/workflows/delete-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Delete Version 🦉


on:
pull_request:
types: [ closed ]

jobs:
rdme-docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v3

- name: Generate branch version string
run: |
BRANCH_NAME="${{ github.head_ref || github.ref || github.event.ref }}"
BRANCH_VERSION=$(echo $BRANCH_NAME | tr -cd '0-9.')
echo "BRANCH_VERSION=$BRANCH_VERSION" >> $GITHUB_ENV
- name: Delete version of docs for branch (if branch is deleted) 🚀
uses: readmeio/rdme@v8
with:
rdme: versions:delete ${{ env.BRANCH_VERSION }} --key=${{ secrets.README_API_KEY }}
48 changes: 0 additions & 48 deletions .github/workflows/manage-docs.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
- name: Check out repo 📚
uses: actions/checkout@v3

- name: Generate branch version string
run: |
BRANCH_NAME="${{ github.head_ref || github.ref || github.event.ref }}"
BRANCH_VERSION=$(echo $BRANCH_NAME | tr -cd '0-9.')
echo "BRANCH_VERSION=$BRANCH_VERSION" >> $GITHUB_ENV
- name: Run `docs` command 🚀
uses: readmeio/rdme@v8
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update ReadMe Docs on Push

on: [push]

jobs:
rdme-docs:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v3

- name: Generate branch version string
run: |
BRANCH_NAME="${{ github.head_ref || github.ref || github.event.ref }}"
BRANCH_VERSION=$(echo $BRANCH_NAME | tr -cd '0-9.')
echo "BRANCH_VERSION=$BRANCH_VERSION" >> $GITHUB_ENV
- name: Delete version of docs for branch (if branch is deleted) 🚀
uses: readmeio/rdme@v8
with:
rdme: docs ${{ env.BRANCH_VERSION }} --version=${{ env.BRANCH_VERSION }} --key=${{ secrets.README_API_KEY }}

0 comments on commit 087a3a9

Please sign in to comment.