Deploy Docs to live #26
Workflow file for this run
This file contains hidden or 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
| name: Deploy Docs to live | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| 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@v4 | |
| with: | |
| name: DocumentationHTML | |
| path: Docs/build/ | |
| - uses: ravsamhq/[email protected] | |
| 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@v4 | |
| 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: Update AltTester Unity SDK link for latest version | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: ${{ secrets.LIVE_URL_ALTTESTER }}/docs/sdk/.*?/ | |
| replace: ${{ secrets.LIVE_URL_ALTTESTER }}/docs/sdk/latest/ | |
| include: "DocumentationHTML/latest/**" | |
| - name: Upload documentation | |
| uses: appleboy/[email protected] | |
| with: | |
| source: DocumentationHTML/* | |
| target: ${{ secrets.DOCUMENTATION_PATH }} | |
| host: ${{ secrets.HOST_IP_ALTTESTER }} | |
| port: ${{ secrets.PORT_LIVE_ALTTESTER }} | |
| username: ${{ secrets.USERNAME_ALTTESTER }} | |
| password: ${{ secrets.PASSWORD_ALTTESTER }} | |
| rm: true | |
| strip_components: 1 | |
| - uses: ravsamhq/[email protected] | |
| 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 }} |