Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
👷 update deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
canstand committed May 13, 2023
1 parent 020c345 commit 9adff04
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ name: GitHub Pages

on:
push:
tags:
- "v*.*.*"
branches:
- "main"

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
Expand All @@ -23,12 +25,12 @@ jobs:
hugo-version: "latest"

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -37,7 +39,7 @@ jobs:
- run: npm install -g postcss-cli autoprefixer
- run: npm ci

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
Expand All @@ -51,6 +53,7 @@ jobs:

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./exampleSite/public

0 comments on commit 9adff04

Please sign in to comment.