-
Notifications
You must be signed in to change notification settings - Fork 54
65 lines (65 loc) · 1.66 KB
/
pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
concurrency:
cancel-in-progress: true
group: "pages"
defaults:
run:
shell: "bash"
jobs:
build:
name: "Build"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup Hugo"
run: "sudo snap install hugo"
- name: "Setup Sass"
run: "sudo snap install dart-sass"
- id: "pages"
name: "Setup Pages"
uses: "actions/configure-pages@v5"
- name: "Build"
run: |
cd exampleSite
hugo --baseURL ${{ steps.pages.outputs.base_url }} --minify
- name: "Upload artifact"
uses: "actions/upload-pages-artifact@v3"
with:
path: "./exampleSite/public"
# build-windows:
# name: "Build Windows"
# runs-on: "windows-latest"
# steps:
# - name: "Checkout"
# uses: "actions/checkout@v4"
# - name: "Setup Hugo"
# run: "choco install hugo-extended"
# - name: "Setup Sass"
# run: "choco install dart-sass-embedded"
# - id: "pages"
# name: "Setup Pages"
# uses: "actions/configure-pages@v5"
# - name: "Build"
# run: |
# cd exampleSite
# hugo --baseURL ${{ steps.pages.outputs.base_url }} --minify
deploy:
environment:
name: "github-pages"
url: "${{ steps.pages.outputs.base_url }}"
if: "github.ref == 'refs/heads/master'"
name: "Deploy"
needs: "build"
runs-on: "ubuntu-latest"
steps:
- name: "Deploy Pages"
uses: "actions/deploy-pages@v4"
name: "GitHub Pages"
on:
push:
branches: ["**"]
workflow_dispatch:
permissions:
contents: "read"
id-token: "write"
pages: "write"