diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4671f581d..7b1eea54f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,77 +1,77 @@ name: "DisCatSharp Docs" on: push: branches: [ main ] workflow_dispatch: jobs: build: runs-on: windows-latest steps: - uses: actions/checkout@v3 with: path: DisCatSharp - uses: actions/checkout@v3 with: repository: Aiko-IT-Systems/DisCatSharp.Docs path: DisCatSharp.Docs token: ${{ secrets.NYUW_TOKEN_GH }} - name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: 6.0.202 - name: Restore dependencies working-directory: ./DisCatSharp run: dotnet restore - name: Build Projects working-directory: ./DisCatSharp run: dotnet build --no-restore - 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 shell: pwsh run: | Get-ChildItem -Exclude .git* | Remove-Item -Recurse -Force - name: Extract new docs shell: pwsh run: | Expand-Archive -Path dcs-docs.zip DisCatSharp.Docs/ - name: Commit and push changes uses: EndBug/add-and-commit@main with: cwd: ./DisCatSharp.Docs default_author: user_info author_name: DisCatSharp author_email: team@aitsys.dev committer_name: NyuwBot committer_email: nyuw@aitsys.dev commit: --signoff message: 'Docs update for commit ${{ github.repository }} (${{ github.sha }})' publish: runs-on: ubuntu-latest needs: build steps: - name: Get SSH Agent - uses: webfactory/ssh-agent@v0.5.3 + uses: webfactory/ssh-agent@v0.5.4 with: ssh-private-key: ${{ secrets.AITSYS_SSH }} - name: Publish on server run: | ssh -o StrictHostKeyChecking=no -T root@80.153.182.68 -f 'cd /var/www/dcs/docs && git pull -f'