CI: node workflow
This commit is contained in:
parent
756ea0a186
commit
2327e55db5
1 changed files with 32 additions and 17 deletions
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
|
@ -6,22 +6,37 @@ on:
|
|||
- master # Set a branch to deploy
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Setup Hugo
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 15
|
||||
|
||||
- name: Install Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
with:
|
||||
hugo-version: '0.75.1'
|
||||
# extended: true
|
||||
hugo-version: 'latest'
|
||||
extended: true
|
||||
|
||||
- name: Build
|
||||
run: hugo -D
|
||||
- name: Check install Hugo
|
||||
run: hugo version
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Delete temporary directories
|
||||
run: npm run clean
|
||||
|
||||
- name: Build production website
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
|
|
Loading…
Reference in a new issue