CI: node workflow
This commit is contained in:
parent
756ea0a186
commit
2327e55db5
1 changed files with 32 additions and 17 deletions
49
.github/workflows/main.yml
vendored
49
.github/workflows/main.yml
vendored
|
@ -6,25 +6,40 @@ on:
|
||||||
- master # Set a branch to deploy
|
- master # Set a branch to deploy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Use Node.js
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.75.1'
|
node-version: 15
|
||||||
# extended: true
|
|
||||||
|
|
||||||
- name: Build
|
- name: Install Hugo
|
||||||
run: hugo -D
|
uses: peaceiris/actions-hugo@v2
|
||||||
|
with:
|
||||||
|
hugo-version: 'latest'
|
||||||
|
extended: true
|
||||||
|
|
||||||
- name: Deploy
|
- name: Check install Hugo
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
run: hugo version
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
- name: Install dependencies
|
||||||
publish_dir: ./public
|
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
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./public
|
||||||
|
|
Loading…
Reference in a new issue