Skip to content

Commit

Permalink
Update blank.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KimTeddy authored Dec 22, 2024
1 parent aa7315a commit 2026fc4
Showing 1 changed file with 15 additions and 23 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,33 @@ on:

# jobs은 실행될 action을 포함하고 있다.
jobs:

build:
runs-on: ubuntu-22.04
#steps는 명령어 들이다.
# uses는 이미 만들어진 action을 사용하는 것, run은 명령어를 실행하는 것이다.
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-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb

#1. 가상머신으로 checkout
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
# run 다음 내용들은 submodule을 최신으로 udapte한것을 가져오는 내용 + a이다.

submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod


#4. Hugo 설치
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true


#5. build (public 폴더에 저장 된다.)
- name: Build Hugo Site
run: |
hugo --gc --minify --baseURL "https://join.mju-rats.com/"
# - name: Check Public Folder
# run: |
# ls -R ./public || echo "Public folder is empty or not created"
hugo --minify && cd public && pwd
# minify는 압축시키는 것을 의미한다.
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: hugo-site
# path: ./public

#6.Deploy 배포: git token이 필요하다. gh-pages로 publish하는 것 잊지 말자
#public 폴더를 github page의 gh-pages 브챈치에 배포한다는 의미이다.
Expand Down

0 comments on commit 2026fc4

Please sign in to comment.