Skip to content

Commit 2c7c28f

Browse files
committed
renewing docs Gha to not user 3rd-party actions
Signed-off-by: junior <[email protected]>
1 parent 5f9e6f4 commit 2c7c28f

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,44 @@ name: Publish Docs
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- master
77
- docs_update
88
paths:
99
- 'src/docs/**'
1010
jobs:
11-
build-and-deploy:
11+
build:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16-
1716
- name: Setup Node
1817
uses: actions/setup-node@v4
1918
with:
2019
node-version: ''
21-
2220
- name: Setup Hugo
23-
uses: peaceiris/actions-hugo@v2
24-
with:
25-
hugo-version: '0.122.0'
26-
extended: true
27-
21+
run: |
22+
sudo apt install -y hugo
2823
- name: Build Hugo Docs
2924
run: |
3025
cd src/docs
3126
make build
32-
33-
- name: Publish to Github Pages
34-
uses: peaceiris/actions-gh-pages@v3
27+
- name: Upload production artifact
28+
uses: actions/upload-pages-artifact@v3
3529
with:
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_branch: gh-pages
38-
publish_dir: src/docs/public
30+
path: ./src/docs/public
31+
32+
deploy:
33+
needs: build
34+
permissions:
35+
pages: write
36+
id-token: write
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4
45+

0 commit comments

Comments
 (0)