mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-24 20:12:15 +01:00
Migrate javascript action (#21)
This commit is contained in:
26
.github/workflows/push.yml
vendored
26
.github/workflows/push.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Push workflow
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Docker build and print Hugo version
|
||||
env:
|
||||
DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }}
|
||||
run: |
|
||||
docker build . --file Dockerfile --tag ${DOCKER_IMAGE} &&
|
||||
docker run ${DOCKER_IMAGE} version ||
|
||||
(echo -e "\e[31m[${GITHUB_WORKFLOW}] failed to build\e[m" && exit 1)
|
||||
|
||||
hadolint:
|
||||
runs-on: macOS-10.14
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: hadolint
|
||||
run: |
|
||||
brew install hadolint
|
||||
hadolint ./Dockerfile
|
||||
48
.github/workflows/test.yml
vendored
Normal file
48
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: 'Test'
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
# - name: Test script
|
||||
# run: npm test
|
||||
|
||||
- name: Build production
|
||||
run: npm run build
|
||||
|
||||
|
||||
test-prod:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hugo-version: [null]
|
||||
# hugo-version: [null, 'latest', '0.58.2']
|
||||
extended: [null]
|
||||
# extended: [null, true, false]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Test action
|
||||
uses: ./
|
||||
with:
|
||||
hugo-version: ${{ matrix.hugo-version }}
|
||||
extended: ${{ matrix.extended }}
|
||||
|
||||
- name: Dump
|
||||
run: |
|
||||
hugo version
|
||||
go version
|
||||
git --version
|
||||
Reference in New Issue
Block a user