refactor: migrate to Forgejo workflows, normalize env file names, remove GitHub Actions
Some checks failed
Deploy Nyla Frontend to Production / build-and-deploy (push) Failing after 1s
Some checks failed
Deploy Nyla Frontend to Production / build-and-deploy (push) Failing after 1s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
f35e22c7f4
commit
6dbf91afb2
5 changed files with 7 additions and 15 deletions
|
|
@ -6,7 +6,6 @@ on:
|
||||||
- int
|
- int
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Cancel in-progress runs when a new run is triggered (saves logs/storage)
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -17,17 +16,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Copy integration environment file
|
- name: Copy integration environment file
|
||||||
run: |
|
run: |
|
||||||
cp config/env-poweron-nyla-int.env .env
|
cp config/env-int.env .env
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -39,10 +38,8 @@ jobs:
|
||||||
|
|
||||||
- name: Prepare deployment package
|
- name: Prepare deployment package
|
||||||
run: |
|
run: |
|
||||||
# Create deployment package with build files and necessary configs
|
|
||||||
mkdir deploy
|
mkdir deploy
|
||||||
cp -r dist/* deploy/
|
cp -r dist/* deploy/
|
||||||
# Create a simple server.js for serving the app
|
|
||||||
echo "const express = require('express');" > deploy/server.js
|
echo "const express = require('express');" > deploy/server.js
|
||||||
echo "const path = require('path');" >> deploy/server.js
|
echo "const path = require('path');" >> deploy/server.js
|
||||||
echo "const app = express();" >> deploy/server.js
|
echo "const app = express();" >> deploy/server.js
|
||||||
|
|
@ -50,7 +47,6 @@ jobs:
|
||||||
echo "app.get('/*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); });" >> deploy/server.js
|
echo "app.get('/*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); });" >> deploy/server.js
|
||||||
echo "const port = process.env.PORT || 8080;" >> deploy/server.js
|
echo "const port = process.env.PORT || 8080;" >> deploy/server.js
|
||||||
echo "app.listen(port, () => console.log('Server running on port', port));" >> deploy/server.js
|
echo "app.listen(port, () => console.log('Server running on port', port));" >> deploy/server.js
|
||||||
# Create a new package.json for deployment
|
|
||||||
echo '{
|
echo '{
|
||||||
"name": "frontend-int",
|
"name": "frontend-int",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
@ -68,4 +64,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
app-name: 'poweron-nyla-int'
|
app-name: 'poweron-nyla-int'
|
||||||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_POWERON_NYLA_INT }}
|
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_POWERON_NYLA_INT }}
|
||||||
package: ./deploy
|
package: ./deploy
|
||||||
|
|
@ -6,7 +6,6 @@ on:
|
||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Cancel in-progress runs when a new run is triggered (saves logs/storage)
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -17,17 +16,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Copy production environment file
|
- name: Copy production environment file
|
||||||
run: |
|
run: |
|
||||||
cp config/env-poweron-nyla-prod.env .env
|
cp config/env-prod.env .env
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -39,10 +38,8 @@ jobs:
|
||||||
|
|
||||||
- name: Prepare deployment package
|
- name: Prepare deployment package
|
||||||
run: |
|
run: |
|
||||||
# Create deployment package with build files and necessary configs
|
|
||||||
mkdir deploy
|
mkdir deploy
|
||||||
cp -r dist/* deploy/
|
cp -r dist/* deploy/
|
||||||
# Create a simple server.js for serving the app
|
|
||||||
echo "const express = require('express');" > deploy/server.js
|
echo "const express = require('express');" > deploy/server.js
|
||||||
echo "const path = require('path');" >> deploy/server.js
|
echo "const path = require('path');" >> deploy/server.js
|
||||||
echo "const app = express();" >> deploy/server.js
|
echo "const app = express();" >> deploy/server.js
|
||||||
|
|
@ -50,7 +47,6 @@ jobs:
|
||||||
echo "app.get('/*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); });" >> deploy/server.js
|
echo "app.get('/*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); });" >> deploy/server.js
|
||||||
echo "const port = process.env.PORT || 8080;" >> deploy/server.js
|
echo "const port = process.env.PORT || 8080;" >> deploy/server.js
|
||||||
echo "app.listen(port, () => console.log('Server running on port', port));" >> deploy/server.js
|
echo "app.listen(port, () => console.log('Server running on port', port));" >> deploy/server.js
|
||||||
# Create a new package.json for deployment
|
|
||||||
echo '{
|
echo '{
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
Loading…
Reference in a new issue