fix home page #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.140.1 | |
DART_SASS_VERSION: 1.83.0 | |
steps: | |
- name: Install Hugo CLI & Dart Sass | |
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 | |
wget -O ${{ runner.temp }}/dart-sass.tar.gz https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz | |
tar -xvf ${{ runner.temp }}/dart-sass.tar.gz -C ${{ runner.temp }} | |
sudo ln -s ${{ runner.temp }}/dart-sass/sass /usr/local/bin/sass | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- name: Build with Hugo | |
env: | |
HUGO_ENVIRONMENT: production | |
HUGO_ENV: production | |
BASE_URL: "${{ steps.pages.outputs.base_url }}/" | |
run: make build | |
- name: Upload artifact | |
if: github.ref_name == github.event.repository.default_branch | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./public | |
deploy: | |
if: github.ref_name == github.event.repository.default_branch | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |