-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
54 lines (44 loc) · 1.54 KB
/
Taskfile.yml
File metadata and controls
54 lines (44 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: "3"
tasks:
# Development task to start the local development server
dev:
desc: "Start the development server with hot module replacement"
cmds:
- npm run dev
# Production build task
build:
desc: "Build the production version of the project"
cmds:
# Build the project using Vite's build command
- npm run build
# Deployment task (similar to the original, but adapted for Vite)
deploy:
desc: "Build and deploy the production version to a static site repository"
cmds:
# Build the project
- npm run build
# Checkout prod branch in the target repo
- git -C ../../../comiccoin-publicfaucet-static checkout -B prod
# Copy build files (Vite generates the "dist" directory by default)
- cp -Rf ./dist/* ../../../comiccoin-publicfaucet-static
# Remove build directory
- rm -Rf ./dist
# Commit and push changes
- git -C ../../../comiccoin-publicfaucet-static add --all
- git -C ../../../comiccoin-publicfaucet-static commit -m 'Latest production deployment.'
- git -C ../../../comiccoin-publicfaucet-static push origin prod
# Optional: Lint and type-check task
lint:
desc: "Run ESLint and TypeScript type checking"
cmds:
- npm run lint
- npm run typecheck
# Optional: Run tests
test:
desc: "Run project tests"
cmds:
- npm run test
undelast:
desc: Undue last commit which was not pushed. Special thanks to https://www.nobledesktop.com/learn/git/undo-changes.
cmds:
- git reset --soft HEAD~