Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Jun 23, 2024
1 parent 5e94525 commit fca85bd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 25 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ name: CI
on:
push:
branches:
- main # or the branch you want to trigger the workflow on
- main
pull_request:
branches:
- main

jobs:
build-and-deploy:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # Specify the Node.js version you want to use
node-version: '18'

- name: Install dependencies
run: npm install
Expand All @@ -29,17 +28,3 @@ jobs:

- name: Build project
run: npm run build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: ./dist
production-branch: main
deploy-message: ${{ github.event.head_commit.message }}
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: ./dist
production-branch: main
deploy-message: ${{ github.event.head_commit.message }}
enable-pull-request-comment: true
enable-commit-comment: true
overwrites-pull-request-comment: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 10
22 changes: 15 additions & 7 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fca85bd

Please sign in to comment.