Skip to content

Commit f4d85c7

Browse files
authored
Use build-website workflow in CI
1 parent 1b01666 commit f4d85c7

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,6 @@ on:
44
pull_request:
55
branches: [main]
66

7-
permissions:
8-
contents: read
9-
pages: write
10-
id-token: write
11-
127
jobs:
13-
build:
14-
runs-on: ubuntu-24.04
15-
env:
16-
HUGO_VERSION: 0.143.1
17-
steps:
18-
- name: Install Hugo CLI
19-
run: |
20-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
21-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
with:
25-
submodules: recursive
26-
fetch-depth: 0
27-
- name: Setup Pages
28-
id: pages
29-
uses: actions/configure-pages@v5
30-
- name: Build with Hugo
31-
env:
32-
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
33-
HUGO_ENVIRONMENT: production
34-
TZ: America/Los_Angeles
35-
run: |
36-
hugo \
37-
--gc \
38-
--minify \
39-
--baseURL "${{ steps.pages.outputs.base_url }}/"
40-
- name: Upload artifact
41-
uses: actions/upload-pages-artifact@v3
42-
with:
43-
path: ./public
44-
45-
deploy:
46-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
47-
runs-on: ubuntu-24.04
48-
needs: build
49-
environment:
50-
name: github-pages
51-
url: ${{ steps.deployment.outputs.page_url }}
52-
steps:
53-
- name: Deploy to GitHub Pages
54-
id: deployment
55-
uses: actions/[email protected]
8+
build-website:
9+
uses: modelica/ma-hugo-theme/.github/workflows/build-website.yml@25ac134f820ada1ec0883de1e38c48e9019a49ec

0 commit comments

Comments
 (0)