Skip to content

Commit

Permalink
always deploy the site on push, but only build api docs on release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellpeck committed Sep 15, 2024
1 parent c5f4fd2 commit 82dd677
Show file tree
Hide file tree
Showing 241 changed files with 291,734 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# suppress diffs and stats for generated api yamls
Docs/api/** linguist-generated
9 changes: 6 additions & 3 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ jobs:
dotnet-version: '8.0.x'
- name: Restore tools
run: dotnet tool restore
- name: Run Document
run: dotnet cake --target Document --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
- name: Run BuildDocsMetadata
if: startsWith(github.ref, 'refs/tags/')
run: dotnet cake --target BuildDocsMetadata --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
- name: Run BuildDocsSite
run: dotnet cake --target BuildDocsSite --ref ${{ github.ref }} --buildNum ${{ github.run_number }}
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
include-hidden-files: true
if-no-files-found: error
- name: Deploy
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'push'
# this is a beautiful way to deploy a website and i will not take any criticism
run: |
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && sudo dpkg -i cloudflared.deb
Expand Down
1 change: 0 additions & 1 deletion Docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
/**/bin/
/**/obj/
_site
api
1,666 changes: 1,666 additions & 0 deletions Docs/api/.manifest

Large diffs are not rendered by default.

Loading

0 comments on commit 82dd677

Please sign in to comment.