60 lines
1.1 KiB
YAML
60 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
FLICKR_API_KEY: ${{ secrets.FLICKR_API_KEY }}
|
|
FLICKR_USER_ID: ${{ secrets.FLICKR_USER_ID }}
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Dump environment
|
|
run: env >> .env
|
|
|
|
- name: Build image
|
|
run: docker-compose build
|
|
|
|
- name: Show image info
|
|
run: docker images
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup Hugo
|
|
uses: peaceiris/actions-hugo@v2
|
|
with:
|
|
hugo-version: '0.73.0'
|
|
extended: true
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '10.x'
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: $HOME/.npm
|
|
key: npm-${{ hashFiles('package-lock.json') }}
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
|
|
- name: Dump environment
|
|
run: env >> .env
|
|
|
|
- name: Build site
|
|
run: ./scripts/release.sh
|
|
|
|
- name: Run tests
|
|
run: ./scripts/test.sh
|