Skip to content

feat(home): ニュース・タチバナについての注意書き #46

feat(home): ニュース・タチバナについての注意書き

feat(home): ニュース・タチバナについての注意書き #46

Workflow file for this run

name: CI
on:
push:
jobs:
# 自動デプロイのためのビルド (main ブランチのみ)
build-for-deploy:
if: startsWith(github.ref, 'refs/heads/main')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install --legacy-peer-deps
env:
CI: true
- name: Build app
run: |
REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')
npm run build
cp -r dist/ docs/
cp docs/index.html docs/404.html
- name: Upload app to gh-pages branch
uses: JamesIves/github-pages-deploy-action@ba1486788b0490a235422264426c45848eac35c6
with:
branch: gh-pages
folder: docs/
# テスト
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: npm install --legacy-peer-deps
env:
CI: true
- name: Run tests
run: npm test -- --ci --no-cache --reporters=default --reporters=jest-junit
- name: Upload test report
uses: dorny/test-reporter@c9b3d0e2bd2a4e96aaf424dbaa31c46b42318226
if: always()
with:
name: "Test Report"
path: "jest-junit.xml"
fail-on-error: "true"
reporter: "jest-junit"