diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 56e3a7d18..f4fc24738 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,54 +1,55 @@ name: "DisCatSharp Docs" on: push: - branches: [ main ] + branches: [ main ] + workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: path: DisCatSharp - uses: actions/checkout@v2 with: repository: Aiko-IT-Systems/DisCatSharp.Docs path: DisCatSharp.Docs token: ${{ secrets.DOCS_TOKEN }} - name: Get SSH uses: webfactory/ssh-agent@v0.5.3 with: ssh-private-key: ${{ secrets.AITSYS_SSH }} - name: Build Docs working-directory: ./DisCatSharp shell: pwsh run: | ./rebuild-docs.ps1 -DocsPath "./DisCatSharp.Docs" -Output ".." -PackageName "dcs-docs" - name: Purge old docs working-directory: ./DisCatSharp.Docs run: | shopt -s extglob rm -rf !(.git|.gitignore) - name: Extract new docs run: | tar -xf dcs-docs.tar.xz -C ./DisCatSharp.Docs - name: Commit and push changes uses: EndBug/add-and-commit@master with: cwd: ./DisCatSharp.Docs default_author: github_actions author_name: DisCatSharp author_email: discatsharp@aitsys.dev message: 'Docs update for commit ${{ github.repository }} (${{ github.sha }})' pull: 'NO-PULL' - name: Publish to Prod run: | ssh -o StrictHostKeyChecking=no -T root@80.153.182.68 -f 'cd /var/www/dcs/docs && git pull -f'