Skip to content

Seoultech (#26)

Seoultech (#26) #68

name: Deploy Website
on:
push:
workflow_dispatch:
concurrency:
group: deploy-website-group
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.111.3"
extended: true
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build
run: |
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
env:
HUGO_ENV: production
HUGO_ENVIRONMENT: production
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
deploy:
runs-on: ubuntu-latest
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2