File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CI/CD
2-
3- on :
4- push :
5- branches : [main]
6- pull_request :
7- branches : [main]
8-
9- permissions :
10- contents : read
11-
12- jobs :
13- build-deploy :
14- runs-on : ubuntu-latest
15-
16- steps :
17- - name : Checkout code
18- uses : actions/checkout@v4
19-
20- - name : Set up Node.js
21- uses : actions/setup-node@v4
22- with :
23- node-version : " 20"
24- cache : " npm"
25-
26- - name : Install dependencies
27- run : npm ci --legacy-peer-deps
28-
29- - name : Lint
30- run : npm run lint --if-present
31-
32- - name : Build
33- run : npm run build
34-
35- - name : Deploy to Netlify
36- if : github.ref == 'refs/heads/main'
37- run : npx netlify-cli deploy --dir=dist --site=$NETLIFY_SITE_ID --prod
38- env :
39- NETLIFY_AUTH_TOKEN : ${{ secrets.NETLIFY_AUTH_TOKEN }}
40- NETLIFY_SITE_ID : ${{ secrets.NETLIFY_SITE_ID }}
1+ # name: CI/CD
2+
3+ # on:
4+ # push:
5+ # branches: [main]
6+ # pull_request:
7+ # branches: [main]
8+
9+ # permissions:
10+ # contents: read
11+
12+ # jobs:
13+ # build-deploy:
14+ # runs-on: ubuntu-latest
15+
16+ # steps:
17+ # - name: Checkout code
18+ # uses: actions/checkout@v4
19+
20+ # - name: Set up Node.js
21+ # uses: actions/setup-node@v4
22+ # with:
23+ # node-version: "20"
24+ # cache: "npm"
25+
26+ # - name: Install dependencies
27+ # run: npm ci --legacy-peer-deps
28+
29+ # - name: Lint
30+ # run: npm run lint --if-present
31+
32+ # - name: Build
33+ # run: npm run build
34+
35+ # - name: Deploy to Netlify
36+ # if: github.ref == 'refs/heads/main'
37+ # run: npx netlify-cli deploy --dir=dist --site=$NETLIFY_SITE_ID --prod
38+ # env:
39+ # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
40+ # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
You can’t perform that action at this time.
0 commit comments