-
Select Topic AreaQuestion BodyI have node js express based application and using parcel to build but when below is the package.json file {
"name": "workshop",
"version": "1.0.0",
"description": "fun of colors; used in one of my talk.",
"type": "module",
"main": "start.js",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"start": "nodemon --watch . --exec babel-node -- index.js",
"serve": "NODE_ENV=dev nodemon dist/index.js",
"build": "parcel build index.js",
"watch": "parcel watch"
},
"author": "Keshav Mohta",
"publisher": "@xkeshav",
"homepage": "https://xkeshav.github.io/workshop",
"license": "SEE LICENSE IN LICENSE",
"bugs": {
"url": "https://github.com/xkeshav/workshop/issues",
"email": "xkeshav@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/xkeshav/workshop.git"
},
"dependencies": {
"@babel/core": "^7.21.4",
"@babel/polyfill": "7.4.4",
"@babel/register": "^7.15.3",
"body-parser": "^1.20.2",
"express": "^4.18.2"
},
"devDependencies": {
"@babel/cli": "^7.21.0",
"@babel/node": "7.2.2",
"@babel/preset-env": "7.4.4",
"eslint": "5.16.0",
"eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-import": "2.17.2",
"gh-pages": "^5.0.0",
"nodemon": "^2.0.22",
"parcel": "^2.8.3"
} and below is my workflow yaml name: learn-github-actions
run-name: ${{ github.actor }} is learning GitHub Actions
on:
push:
branches:
- main
- 'feature/*'
pull_request:
branches:
- main
jobs:
deployement:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: '14'
cache: 'npm'
- name : npm install, build and test
run: |
npm install
npm run build --if-present
npm run test --if-present
which run successfully and when open the github page link ---> https://xkeshav.github.io/workshop/ it show the readme of my file and if I add the - name : npm install, build and test
run: |
npm install
npm run build --if-present
npm run test --if-present
- name: serve
run: npm run serve then serve command keep running and job never completed what is missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I was looking at the repo and there doesn't seem to exist a index.html, so I guess github will just default to README.md when there's no such file, trying adding what you want as the landing page as index.html file and see if that works for you. |
Beta Was this translation helpful? Give feedback.
-
response #30173 |
Beta Was this translation helpful? Give feedback.
-
Hi @xkeshav,It's stated in the docs that: Github Pages is a static hosting service. Meaning it can host static files along with HTML, CSS, JavaScript files only. If you want to host your express app, there's a comprehensive list of free hosting providers on freefordev. Just pick one that supports Express.js. |
Beta Was this translation helpful? Give feedback.
Hi @xkeshav,
It's stated in the docs that:
Github Pages is a static hosting service. Meaning it can host static files along with HTML, CSS, JavaScript files only.
No database.
No backend server.
If you want to host your express app, there's a comprehensive list of free hosting providers on freefordev. Just pick one that supports Express.js.