-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
2,199 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Build Nuxt and Cordova | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Adjust to your main branch | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up Node.js | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18" # Adjust to your Node.js version | ||
|
||
# Step 3: Install dependencies for Nuxt 3 project | ||
- name: Install dependencies | ||
run: npm install | ||
working-directory: . # Root directory | ||
|
||
# Step 4: Build the Nuxt 3 app | ||
- name: Build Nuxt 3 app | ||
run: npm run build | ||
working-directory: . # Root directory | ||
|
||
# Step 5: Copy Nuxt build output to Cordova 'www' folder | ||
- name: Copy Nuxt build to Cordova www | ||
run: | | ||
rm -rf mobile/www/* | ||
cp -r dist/* mobile/www/ | ||
working-directory: . | ||
|
||
# Step 6: Set up Java (required for Cordova) | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "11" # You may need to adjust the version for Cordova compatibility | ||
|
||
# Step 7: Set up Android SDK (required for Cordova) | ||
- name: Install Android SDK | ||
uses: malinskiy/action-android@v2 | ||
with: | ||
api-level: 30 # Adjust to your preferred Android API level | ||
target: default | ||
arch: x86_64 | ||
ndk: "21.4.7075529" # Adjust NDK version if needed | ||
|
||
# Step 8: Install Cordova | ||
- name: Install Cordova | ||
run: npm install -g cordova | ||
|
||
# Step 9: Build the Cordova Android app | ||
- name: Build Cordova Android app | ||
run: | | ||
cordova platform add android | ||
cordova build android | ||
working-directory: mobile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
.nitro | ||
.cache | ||
dist | ||
|
||
mobile/www | ||
mobile/platforms | ||
# Node dependencies | ||
node_modules | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
.DS_Store | ||
|
||
# Generated by package manager | ||
node_modules/ | ||
|
||
# Generated by Cordova | ||
/plugins/ | ||
/platforms/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget id="com.magic.magicping" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>MagicPing</name> | ||
<description>Sample Apache Cordova App</description> | ||
<author email="dev@cordova.apache.org" href="https://cordova.apache.org"> | ||
Apache Cordova Team | ||
</author> | ||
<content src="index.html" /> | ||
<allow-intent href="http://*/*" /> | ||
<allow-intent href="https://*/*" /> | ||
</widget> |
Oops, something went wrong.