Skip to content

chore: update ci to deploy on commit #94

chore: update ci to deploy on commit

chore: update ci to deploy on commit #94

Workflow file for this run

name: Build

Check failure on line 1 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

`commit` is not a valid event name
on:
pull_request:
branches:
- dev
types:
- closed
commit:
branches:
- dev
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Dependencies
run: npm install
- name: Build Project
env:
VITE_EMAIL_API_KEY: ${{ secrets.VITE_EMAIL_API_KEY }}
run: npm run build
- name: Upload artifact to enable deployment
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.CI_CD_TOKEN }}
publish_dir: ./dist