You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
concurrency:
|
|
cancel-in-progress: true
|
|
group: "pages"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
jobs:
|
|
build-linux:
|
|
env:
|
|
HUGO_VERSION: 0.102.3
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Hugo CLI
|
|
run: |
|
|
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
|
|
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- id: pages
|
|
name: Setup Pages
|
|
uses: actions/configure-pages@v2
|
|
- env:
|
|
HUGO_ENVIRONMENT: production
|
|
HUGO_ENV: production
|
|
name: Build with Hugo
|
|
run: |
|
|
cd exampleSite
|
|
hugo --minify --baseURL ${{ steps.pages.outputs.base_url }} --themesDir ../..
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v1
|
|
with:
|
|
path: ./exampleSite/public
|
|
# build-windows:
|
|
# runs-on: windows-latest
|
|
# steps:
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v3
|
|
# with:
|
|
# submodules: recursive
|
|
# - name: Install Hugo
|
|
# run: choco install hugo
|
|
# - name: Build
|
|
# run: |
|
|
# cd exampleSite
|
|
# hugo --baseURL ${{ steps.pages.outputs.base_url }} --environment production --minify --themesDir ../..
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.pages.outputs.base_url }}
|
|
needs: build-linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v1
|
|
name: Deploy Hugo site to Pages
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
pages: write
|