Skip to content

Commit b711e23

Browse files
authored
Remove the GitHub Pages branch
1 parent 6dd5e9b commit b711e23

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

.github/workflows/publish-site.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ on:
33
push:
44
branches:
55
- 'main'
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
610
jobs:
711
Build:
812
runs-on: ubuntu-latest
913
steps:
1014
- uses: actions/checkout@v2
1115
with:
12-
token: ${{ secrets.PUSHABLE_GITHUB_TOKEN }}
16+
submodules: 'true'
1317
- name: Setup .NET 5.0
1418
uses: actions/setup-dotnet@v1
1519
with:
@@ -22,19 +26,19 @@ jobs:
2226
uses: actions/setup-dotnet@v1
2327
with:
2428
dotnet-version: 7.0.102
25-
- name: Checkout Website Branch
26-
run: |
27-
git fetch --all
28-
git config --local user.email "[email protected]"
29-
git config --local user.name "The Silk.NET Automaton"
30-
git merge --allow-unrelated-histories -s ours origin/ci/github-pages
31-
git checkout ci/github-pages
32-
git reset --hard main
33-
git submodule init
3429
- name: Run Statiq
3530
run: dotnet run -c Release --project src/Website/Silk.NET.Statiq/Silk.NET.Statiq.csproj -- -l debug --nocache
36-
- name: Push to Website Branch
37-
run: |
38-
git add -f docs/
39-
git commit -am "Push latest built GitHub Pages site"
40-
git push
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v1
33+
with:
34+
path: "docs"
35+
Deploy:
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
runs-on: ubuntu-latest
40+
needs: Build
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)