File tree 2 files changed +38
-5
lines changed
2 files changed +38
-5
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ release :
3
+ types : [prereleased]
4
+
5
+ jobs :
6
+ publish :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+ - uses : actions/setup-node@v3
11
+ with :
12
+ node-version : " 20"
13
+ - run : npm ci
14
+ - run : npm run lint
15
+ - run : npm run test
16
+ - run : npm run generate
17
+ - name : Deploy to netlify branch
18
+ env :
19
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20
+ run : |
21
+ git fetch
22
+ git checkout netlify
23
+ rm -rf ./*
24
+ rm -rf .nuxt
25
+ mv .output/public/* .
26
+ rm -rf .output
27
+ git add .
28
+ git config --global user.email "[email protected] "
29
+ git config --global user.name "publish action"
30
+ git commit -m "deploy: $GITHUB_REF_NAME"
31
+ git push origin netlify
32
+ - name : Set release to latest
33
+ env :
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ run : |
36
+ gh release edit ${GITHUB_REF_NAME} --prerelease=false --latest
37
+
Original file line number Diff line number Diff line change 10
10
"generate" : " nuxt generate" ,
11
11
"preview" : " nuxt preview" ,
12
12
"postinstall" : " nuxt prepare" ,
13
- "start" : " nuxt start" ,
14
- "deploy" : " rm -rf .output; npm run generate; npm run deploy:2" ,
15
- "deploy:2" :
" cd .output/public; git init --initial-branch=main; git remote add origin [email protected] :Chalks/jdw.me.git; npm run deploy:3" ,
16
- "deploy:3" : " cd .output/public; git add .; git commit -m 'Initial commit'; npm run deploy:4" ,
17
- "deploy:4" : " cd .output/public; git push --force origin main:netlify"
13
+ "start" : " nuxt start"
18
14
},
19
15
"repository" : {
20
16
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments