Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(workflow): add homepage CI pipeline #138

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/build-homepage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: homepage CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

defaults:
run:
shell: bash
working-directory: homepage

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: ./yarn.lock
- run: yarn install
- run: yarn build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: ./yarn.lock
- run: yarn install
- run: yarn lint
40 changes: 21 additions & 19 deletions homepage/public/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ collections: # A list of collections the CMS should be able to edit
label: 'Type',
name: 'type',
widget: 'select',
options: [
{ label: '專案', value: 'project' },
{ label: '人力', value: 'job' },
{ label: '事件', value: 'event' },
],
options:
[
{ label: '專案', value: 'project' },
{ label: '人力', value: 'job' },
{ label: '事件', value: 'event' },
],
i18n: duplicate,
}
- {
Expand All @@ -74,20 +75,21 @@ collections: # A list of collections the CMS should be able to edit
widget: 'select',
required: false,
multiple: true,
options: [
{ label: '開放政府', value: 'open gov' },
{ label: '開放資料', value: 'open data' },
{ label: '開放原始碼', value: 'open source' },
{ label: '基礎', value: 'basic' },
{ label: '進階', value: 'advance' },
{ label: '工程師', value: 'engineer' },
{ label: '美術設計', value: 'designer' },
{ label: '文字工作者', value: 'writer' },
{ label: '行銷公關', value: 'marketing' },
{ label: '議題工作者', value: 'advocator' },
{ label: '公務員', value: 'civil servants' },
{ label: '法務人員', value: 'legal' },
],
options:
[
{ label: '開放政府', value: 'open gov' },
{ label: '開放資料', value: 'open data' },
{ label: '開放原始碼', value: 'open source' },
{ label: '基礎', value: 'basic' },
{ label: '進階', value: 'advance' },
{ label: '工程師', value: 'engineer' },
{ label: '美術設計', value: 'designer' },
{ label: '文字工作者', value: 'writer' },
{ label: '行銷公關', value: 'marketing' },
{ label: '議題工作者', value: 'advocator' },
{ label: '公務員', value: 'civil servants' },
{ label: '法務人員', value: 'legal' },
],
i18n: duplicate,
}
- { label: 'Content', name: 'body', widget: 'markdown', i18n: true }
Expand Down