Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPoienar committed Apr 30, 2024
2 parents d7a6370 + 5220957 commit d91459d
Show file tree
Hide file tree
Showing 18 changed files with 2,245 additions and 1,260 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/deploy-docs-to-live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Deploy Docs to live

on:
push:
branches:
- master
workflow_dispatch:

jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
docs:
- 'Docs/**'
build-docs:
runs-on: ubuntu-latest
needs: paths-filter
if: needs.paths-filter.outputs.docs == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r "Docs/requirements.txt"
- name: Build docs
run: |
cd Docs
make versionedhtml
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: Docs/build/
- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'master' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

deploy-docs:
runs-on: ubuntu-latest
needs: build-docs

if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: DocumentationHTML
path: DocumentationHTML/

- name: Update AltTester Desktop link for latest version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ secrets.LIVE_URL_ALTTESTER }}/docs/desktop/.*?/
replace: ${{ secrets.LIVE_URL_ALTTESTER }}/docs/desktop/latest/
include: "DocumentationHTML/latest/**"

- name: Upload documentation
uses: garygrossgarten/github-action-scp@release
with:
local: DocumentationHTML
remote: ${{ secrets.DOCUMENTATION_PATH }}
host: ${{ secrets.HOST_IP_ALTTESTER }}
port: ${{ secrets.PORT_LIVE_ALTTESTER }}
username: ${{ secrets.USERNAME_ALTTESTER }}
password: ${{ secrets.PASSWORD_ALTTESTER }}
rmRemote: true

- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'master' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
105 changes: 105 additions & 0 deletions .github/workflows/deploy-docs-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Deploy Docs to staging

on:
push:
branches:
- development
workflow_dispatch:

jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
docs:
- 'Docs/**'
build-docs:
runs-on: ubuntu-latest
needs: paths-filter
if: needs.paths-filter.outputs.docs == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r "Docs/requirements.txt"
- name: Build docs
run: |
cd Docs
make html
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: Docs/build/
- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'development' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

deploy-dev-docs:
runs-on: ubuntu-latest
needs: build-docs
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: DocumentationHTML
path: DocumentationHTML/

- name: Replace URL
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ secrets.LIVE_URL_ALTTESTER }}
replace: ${{ secrets.DEV_URL_ALTTESTER }}
regex: true

- name: Update AltTester® Desktop link for latest version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ secrets.DEV_URL_ALTTESTER }}/docs/desktop/.*?/
replace: ${{ secrets.DEV_URL_ALTTESTER }}/docs/desktop/latest/
include: "DocumentationHTML/latest/**"

- name: Upload documentation
uses: garygrossgarten/github-action-scp@release
with:
local: DocumentationHTML
remote: ${{ secrets.DOCUMENTATION_PATH }}
host: ${{ secrets.HOST_IP_ALTTESTER }}
port: ${{ secrets.PORT_DEV_ALTTESTER }}
username: ${{ secrets.USERNAME_ALTTESTER }}
password: ${{ secrets.PASSWORD_ALTTESTER }}
rmRemote: true

- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'development' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
91 changes: 91 additions & 0 deletions .github/workflows/deploy-versioned-docs-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Deploy versioned docs to staging

on: [workflow_dispatch]

concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r "Docs/requirements.txt"
- name: Build docs
run: |
cd Docs
make versionedhtml
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: Docs/build/
- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'development' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}

deploy-dev-docs:
runs-on: ubuntu-latest
needs: build-docs

steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: DocumentationHTML
path: DocumentationHTML/

- name: Replace URL
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ secrets.LIVE_URL_ALTTESTER }}
replace: ${{ secrets.DEV_URL_ALTTESTER }}
regex: true

- name: Update AltTester® Desktop link for latest version
uses: jacobtomlinson/gha-find-replace@v3
with:
find: ${{ secrets.DEV_URL_ALTTESTER }}/docs/desktop/.*?/
replace: ${{ secrets.DEV_URL_ALTTESTER }}/docs/desktop/latest/
include: "DocumentationHTML/latest/**"

- name: Upload documentation
uses: garygrossgarten/github-action-scp@release
with:
local: DocumentationHTML
remote: ${{ secrets.DOCUMENTATION_PATH }}
host: ${{ secrets.HOST_IP_ALTTESTER }}
port: ${{ secrets.PORT_DEV_ALTTESTER }}
username: ${{ secrets.USERNAME_ALTTESTER }}
password: ${{ secrets.PASSWORD_ALTTESTER }}
rmRemote: true

- uses: ravsamhq/notify-slack-action@2.3.0
if: ${{ always() && github.ref_name == 'development' }}
with:
status: ${{ job.status }}
notification_title: "The Job *{job}* in Workflow *{workflow}* has {status_message}"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on <{commit_url}|{commit_sha}>"
footer: "Linked Repo <{repo_url}|{repo}>"
notify_when: "failure"
mention_groups: "alttester-pipelines,!here"
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }}
Loading

0 comments on commit d91459d

Please sign in to comment.