Skip to content

Create dependabot.yml #81

Create dependabot.yml

Create dependabot.yml #81

Workflow file for this run

name: CI
on:
push:
branches:
- '**' # すべてのブランチでテストを実行
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: install dependencies
run: |
npm install
- name: run test
run: |
npm run test
build:
if: github.ref == 'refs/heads/master' # masterブランチのときのみ実行
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: install dependencies
run: |
npm install
- name: build
run: |
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: ./dist
deploy:
if: github.ref == 'refs/heads/master' # masterブランチのときのみ実行
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build
path: ./dist
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist