File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
2
2
3
3
on :
4
4
push :
5
- branches : [ "dev" ] # Only trigger on master branch
5
+ branches : [ "dev" ] # Trigger on dev branch
6
6
paths-ignore :
7
7
- ' **.md'
8
8
- ' **.txt'
@@ -19,14 +19,36 @@ jobs:
19
19
steps :
20
20
- name : Checkout repository
21
21
uses : actions/checkout@v4
22
- with :
23
- ref : master # Explicitly checkout the master branch
22
+ # Remove the ref: master line since we want to use the branch that triggered the workflow
24
23
25
24
- name : Set up Node.js
26
25
uses : actions/setup-node@v4
27
26
with :
28
27
node-version : ' 20'
29
28
29
+ - name : Check directory contents
30
+ run : ls -la
31
+
32
+ - name : Create package.json if not exists
33
+ run : |
34
+ if [ ! -f package.json ]; then
35
+ echo "Creating basic package.json"
36
+ cat > package.json << 'EOF'
37
+ {
38
+ "name": "khalilcharfi-portfolio",
39
+ "version": "1.0.0",
40
+ "description": "Khalil Charfi's multilingual portfolio website",
41
+ "scripts": {
42
+ "build:all": "node scripts/build.js && node scripts/generate-redirect.js && node scripts/generate-meta.js"
43
+ },
44
+ "dependencies": {
45
+ "handlebars": "^4.7.8",
46
+ "html-minifier": "^4.0.0"
47
+ }
48
+ }
49
+ EOF
50
+ fi
51
+
30
52
- name : Install dependencies
31
53
run : npm i
32
54
You can’t perform that action at this time.
0 commit comments