Skip to content

Commit

Permalink
workflows(docs): fix cloudflare project doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jhdcruz committed Jul 31, 2023
1 parent 084f599 commit fc80281
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 29 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: remove SNAPSHOT on gradle.properties version
run: |
cd ${{ inputs.project }}
sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties
- name: remove SNAPSHOT on root gradle.properties
run: sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties

- name: Get version from gradle.properties
id: version_name
shell: bash
run: |
cd ${{ inputs.project }}
echo "version=$(grep '^VERSION=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Dokka build
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -42,7 +57,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/api/${{ inputs.project }}
path: ./docs/api/${{ inputs.project }}/${{ steps.version_name.outputs.version }}
if-no-files-found: error

push:
Expand All @@ -54,7 +69,7 @@ jobs:
fetch-depth: 0

# remove previous versions, new version contains the old ones
- name: Remove previous versions
- name: Remove current ${{ inputs.project }} docs
run: rm -rf docs/api/${{ inputs.project }}

- name: Download artifact
Expand Down Expand Up @@ -88,9 +103,6 @@ jobs:
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/docs/docs-core.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: docs / core

on:
workflow_dispatch:
workflow_call:
inputs:
project:
description: 'Project to run the command to.'
type: string
required: true

permissions:
contents: write
Expand All @@ -29,6 +33,21 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: remove SNAPSHOT on gradle.properties version
run: |
cd kipher-core
sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties
- name: remove SNAPSHOT on root gradle.properties
run: sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties

- name: Get version from gradle.properties
id: version_name
shell: bash
run: |
cd kipher-core
echo "version=$(grep '^VERSION=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Dokka build
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -38,7 +57,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/api/kipher-core
path: ./docs/api/kipher-core/${{ steps.version_name.outputs.version }}
if-no-files-found: error

push:
Expand All @@ -50,7 +69,7 @@ jobs:
fetch-depth: 0

# remove previous versions, new version contains the old ones
- name: Remove previous versions
- name: Remove current kipher-core docs
run: rm -rf docs/api/kipher-core

- name: Download artifact
Expand Down Expand Up @@ -84,9 +103,6 @@ jobs:
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/docs/docs-digest.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: docs / digest

on:
workflow_dispatch:
workflow_call:
inputs:
project:
description: 'Project to run the command to.'
type: string
required: true

permissions:
contents: write
Expand All @@ -29,6 +33,21 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: remove SNAPSHOT on gradle.properties version
run: |
cd kipher-digest
sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties
- name: remove SNAPSHOT on root gradle.properties
run: sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties

- name: Get version from gradle.properties
id: version_name
shell: bash
run: |
cd kipher-digest
echo "version=$(grep '^VERSION=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Dokka build
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -38,7 +57,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/api/kipher-digest
path: ./docs/api/kipher-digest/${{ steps.version_name.outputs.version }}
if-no-files-found: error

push:
Expand All @@ -50,7 +69,7 @@ jobs:
fetch-depth: 0

# remove previous versions, new version contains the old ones
- name: Remove previous versions
- name: Remove current kipher-digest docs
run: rm -rf docs/api/kipher-digest

- name: Download artifact
Expand Down Expand Up @@ -84,9 +103,6 @@ jobs:
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/docs/docs-mac.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: docs / mac

on:
workflow_dispatch:
workflow_call:
inputs:
project:
description: 'Project to run the command to.'
type: string
required: true

permissions:
contents: write
Expand All @@ -29,6 +33,21 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: remove SNAPSHOT on gradle.properties version
run: |
cd kipher-mac
sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties
- name: remove SNAPSHOT on root gradle.properties
run: sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties

- name: Get version from gradle.properties
id: version_name
shell: bash
run: |
cd kipher-mac
echo "version=$(grep '^VERSION=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Dokka build
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -38,7 +57,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/api/kipher-mac
path: ./docs/api/kipher-mac/${{ steps.version_name.outputs.version }}
if-no-files-found: error

push:
Expand All @@ -50,7 +69,7 @@ jobs:
fetch-depth: 0

# remove previous versions, new version contains the old ones
- name: Remove previous versions
- name: Remove current kipher-mac docs
run: rm -rf docs/api/kipher-mac

- name: Download artifact
Expand Down Expand Up @@ -84,9 +103,6 @@ jobs:
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/docs/docs-symmetric.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: docs / symmetric

on:
workflow_dispatch:
workflow_call:
inputs:
project:
description: 'Project to run the command to.'
type: string
required: true

permissions:
contents: write
Expand All @@ -29,6 +33,21 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: remove SNAPSHOT on gradle.properties version
run: |
cd kipher-symmetric
sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties
- name: remove SNAPSHOT on root gradle.properties
run: sed -i '/^VERSION=/ s/-SNAPSHOT//' gradle.properties

- name: Get version from gradle.properties
id: version_name
shell: bash
run: |
cd kipher-symmetric
echo "version=$(grep '^VERSION=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- name: Dokka build
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -38,7 +57,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/api/kipher-symmetric
path: ./docs/api/kipher-symmetric/${{ steps.version_name.outputs.version }}
if-no-files-found: error

push:
Expand All @@ -50,7 +69,7 @@ jobs:
fetch-depth: 0

# remove previous versions, new version contains the old ones
- name: Remove previous versions
- name: Remove current kipher-symmetric docs
run: rm -rf docs/api/kipher-symmetric

- name: Download artifact
Expand Down Expand Up @@ -84,9 +103,6 @@ jobs:
contents: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit fc80281

Please sign in to comment.