-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1137] Moved docs publishing to GHA.
- Loading branch information
1 parent
eaffd46
commit 4b30d20
Showing
8 changed files
with
108 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -616,40 +616,6 @@ jobs: | |
# the main workflow are separated from this one. | ||
DREVOPS_CI_DB_CACHE_BRANCH: drevops-dev-didi-ii | ||
|
||
#----------------------------------------------------------------------------- | ||
# Publish docs to docs.drevops.com | ||
# @todo Move this to GitHub Actions. | ||
#----------------------------------------------------------------------------- | ||
drevops-dev-deploy-docs: | ||
<<: *runner_config | ||
steps: | ||
- checkout | ||
- *step_process_codebase | ||
- *step_setup_remote_docker | ||
- *step_setup_docker_network | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "22:fe:71:f4:65:8d:cb:81:9c:31:09:4e:03:0b:33:b7" | ||
- run: | ||
name: Build and test docs | ||
command: | | ||
cd .drevops/docs | ||
ahoy build | ||
ahoy lint | ||
ahoy test | ||
- run: | ||
name: Publish docs | ||
command: | | ||
cd .drevops/docs | ||
export DOCS_PUBLISH_REMOTE_URL=https://github.com/drevops/drevops_docs.git | ||
export DOCS_PUBLISH_SRC_TAG=${CIRCLE_TAG:-} | ||
export DOCS_PUBLISH_SRC_BRANCH=${CIRCLE_BRANCH:-} | ||
export DOCS_PUBLISH_SSH_FINGERPRINT="22:fe:71:f4:65:8d:cb:81:9c:31:09:4e:03:0b:33:b7" | ||
export DOCS_PUBLISH_CANARY_BRANCH="develop" | ||
export DOCS_PUBLISH_COMMIT_MESSAGE="Automatically pushed from drevops/drevops" | ||
export DOCS_PUBLISH_GIT_EMAIL="[email protected]" | ||
./.utils/publish.sh | ||
#----------------------------------------------------------------------------- | ||
# Publish installer to install.drevops.com | ||
# @todo Move this to GitHub Actions. | ||
|
@@ -810,19 +776,6 @@ workflows: | |
tags: | ||
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/ | ||
|
||
# Build and publish DrevOps docs. | ||
- drevops-dev-deploy-docs: | ||
requires: | ||
- build | ||
- drevops-dev-test | ||
- drevops-dev-test-workflow | ||
filters: | ||
branches: | ||
# 'main' or any branch with 'docs' in the name. | ||
only: /^main$|^develop$|.*docs.*/ | ||
tags: | ||
only: /^[0-9]+(\.[0-9]+)+(-rc[0-9]+)?$/ | ||
|
||
# Publish DrevOps installer. | ||
- drevops-dev-deploy-installer: | ||
requires: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"name": "drevops/docs", | ||
"require": { | ||
"php": ">=8.1", | ||
"alexskrypnyk/shellvar": "^0.5" | ||
}, | ||
"authors": [ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# This action is used for DrevOps maintenance. It will not be used in the scaffolded project. | ||
name: Publish DrevOps documentation | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- develop | ||
- '**docs**' | ||
|
||
jobs: | ||
drevops-publish-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Ahoy | ||
run: os=$(uname -s | tr [:upper:] [:lower:]) && architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) && sudo wget -q https://github.com/ahoy-cli/ahoy/releases/latest/download/ahoy-bin-$os-$architecture -O /usr/local/bin/ahoy && sudo chown $USER /usr/local/bin/ahoy && chmod +x /usr/local/bin/ahoy | ||
|
||
- name: Install Aspell | ||
run: sudo apt-get update -y && sudo apt-get install -y aspell | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
||
- name: Build site | ||
working-directory: .drevops/docs | ||
run: ahoy build | ||
|
||
- name: Check spelling | ||
working-directory: .drevops/docs | ||
run: ahoy lint | ||
|
||
- name: Run tests | ||
working-directory: .drevops/docs | ||
run: ahoy test | ||
|
||
- name: Setup SSH private key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.DOCS_PUBLISH_SSH_PRIVATE_KEY }} | ||
|
||
- name: Publish docs | ||
run: | | ||
cd .drevops/docs | ||
export [email protected]:drevops/drevops_docs.git | ||
export DOCS_PUBLISH_SRC_TAG=${{ github.ref_type == 'tag' && github.ref_name || '' }} | ||
export DOCS_PUBLISH_SRC_BRANCH=${{ github.ref_type == 'branch' && github.ref_name || '' }} | ||
export DOCS_PUBLISH_CANARY_BRANCH="develop" | ||
export DOCS_PUBLISH_COMMIT_MESSAGE="Automatically pushed from drevops/drevops" | ||
export DOCS_PUBLISH_GIT_EMAIL="[email protected]" | ||
./.utils/publish.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# This action is used for DrevOps maintenance. It will not be used in the scaffolded project. | ||
name: Test DrevOps documentation | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
drevops-test-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install Ahoy | ||
run: os=$(uname -s | tr [:upper:] [:lower:]) && architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) && sudo wget -q https://github.com/ahoy-cli/ahoy/releases/latest/download/ahoy-bin-$os-$architecture -O /usr/local/bin/ahoy && sudo chown $USER /usr/local/bin/ahoy && chmod +x /usr/local/bin/ahoy | ||
|
||
- name: Install Aspell | ||
run: sudo apt-get update -y && sudo apt-get install -y aspell | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
||
- name: Build site | ||
working-directory: .drevops/docs | ||
run: ahoy build | ||
|
||
- name: Check spelling | ||
working-directory: .drevops/docs | ||
run: ahoy lint | ||
|
||
- name: Run tests | ||
working-directory: .drevops/docs | ||
run: ahoy test |