Github actio to create a html file in the main branch - github

I have copied/closed this repository (https://github.com/staticwebdev/vanilla-basic).
Now I want to create a HTML (let's call it dummy.html) in the src folder of this repo with the content as below.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Vanilla JavaScript App</title>
</head>
<body>
<main>
<h1>Customer Approval Page</h1>
<h2> <customer name> </h2>
</main>
</body>
</html>
I found these 2 actions but they are not working for me. Can anyone help?
https://github.com/DamianReeves/write-file-action
https://github.com/1arp/create-a-file-action

I tested this with this workflow:
name: so-037-create-file
#https://stackoverflow.com/questions/73465583/github-actio-to-create-a-html-file-in-the-main-branch
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout#v3
- name: Overwrite file
uses: "DamianReeves/write-file-action#master"
with:
path: src/dummy.html
write-mode: preserve
contents: |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Vanilla JavaScript App</title>
</head>
<body>
<main>
<h1>Customer Approval Page</h1>
<h2> <customer name> </h2>
</main>
</body>
</html>
- name: Commit & Push
uses: Andro999b/push#v1.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true
message: 'Overwritten by Github Actions - ${date}'
and it works.
Folder before the run:
Folder after the run:
Here is the link to the file.

Related

CSS styling not applying to Jekyll website deployed on GitHub Pages

There is a problem with my Jekyll website after deploying it to GitHub Pages. I suspect that the CSS styling is not being loaded properly. The website appears to be properly styled when accessing the main page at philipmutua.me. However, when navigating to other pages such as http://philipmutua.me/categories/ or any other page, the CSS styling does not seem to be applied. Below is my config file:
_config.yml
# Dependencies
markdown: kramdown
highlighter: pygments
# Permalinks
permalink: pretty
# Setup
title: Philip Mutua
tagline: 'Full Stack Web Development.'
description: 'Full stack Developer'
url: https://philipmutua.me
baseurl: /
author:
name: 'Philip Mutua'
url: https://twitter.com/itsphilipmutua
paginate: 5
paginate_path: "page:num"
# Custom vars
version: 1.0.0
github:
repo: https://github.com/pmutua
email: example#email.com
linkedin: linkedin.com/in/pmutua
disqus: pmutua
plugins: [
jekyll-paginate,
jekyll-gist,
jekyll-paginate,
jekyll-seo-tag
]
head.html
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>
{% if page.title == "Home" %}
{{ site.title }} · {{ site.tagline }}
{% else %}
{{ page.title }} · {{ site.title }}
{% endif %}
</title>
<!-- CSS -->
<link rel="stylesheet" href="{{ site.baseurl }}public/css/poole.css">
<link rel="stylesheet" href="{{ site.baseurl }}public/css/syntax.css">
<link rel="stylesheet" href="{{ site.baseurl }}public/css/hyde.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ site.baseurl }}public/favicon.ico">
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
</head>
<div class="container" style="padding-left:30px;line-height: 2;" >
<div id="archives">
browse by <a title="The complete archive of {{ site.name }}'s Blog by category"
href="{{ site.url}}{{ site.baseurl }}/categories">category</a>
</div>
</div>
gh-pages /public/css
Build
2023-01-30T17:16:59.644485Z Cloning repository...
2023-01-30T17:17:01.558067Z From https://github.com/pmutua/pmutua.github.io
2023-01-30T17:17:01.55868Z * branch 9366bb50d1e33d9e14fd2f876eb1624f29b240ae -> FETCH_HEAD
2023-01-30T17:17:01.55886Z
2023-01-30T17:17:01.635576Z HEAD is now at 9366bb5 Update head.html
2023-01-30T17:17:01.636179Z
2023-01-30T17:17:01.782688Z
2023-01-30T17:17:01.810462Z Success: Finished cloning repository files
2023-01-30T17:17:02.72333Z Installing dependencies
2023-01-30T17:17:02.734422Z Python version set to 2.7
2023-01-30T17:17:05.986625Z v12.18.0 is already installed.
2023-01-30T17:17:07.15815Z Now using node v12.18.0 (npm v6.14.4)
2023-01-30T17:17:07.368069Z Started restoring cached build plugins
2023-01-30T17:17:07.382809Z Finished restoring cached build plugins
2023-01-30T17:17:07.868701Z Attempting ruby version 2.7.1, read from environment
2023-01-30T17:17:11.307066Z Using ruby version 2.7.1
2023-01-30T17:17:11.66631Z Using PHP version 5.6
2023-01-30T17:17:11.667382Z Started restoring cached ruby gems
2023-01-30T17:17:11.682448Z Finished restoring cached ruby gems
2023-01-30T17:17:11.683421Z Installing gem bundle
2023-01-30T17:17:11.969321Z [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '/opt/buildhome/cache/bundle'`, and stop using this flag
2023-01-30T17:17:12.119793Z [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
2023-01-30T17:17:14.392024Z Fetching gem metadata from https://rubygems.org/............
2023-01-30T17:17:14.517051Z Fetching gem metadata from https://rubygems.org/.
2023-01-30T17:17:14.631572Z Resolving dependencies...
2023-01-30T17:17:14.69117Z sass-embedded-1.57.1-x86_64-linux-gnu requires rubygems version >= 3.3.22, which
2023-01-30T17:17:14.691487Z is incompatible with the current version, 3.1.2
2023-01-30T17:17:14.764924Z Error during gem install
2023-01-30T17:17:14.769003Z Failed: build command exited with code: 1
2023-01-30T17:17:16.001606Z Failed: an internal error occurred

how to Configure href url for flutter web in index.html

i am trying to run my existing flutter application on web, after adding the support for web and adding firebase javascript code to my index.html, when i run the application on a browser i get this error
If you are serving your web app in a path other than the root, change
the href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order
for it to work correctly. Fore more details: *
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base -->
i have tried looking for solution online but i could not find any, i have tried following this https://flutter.dev/docs/development/ui/navigation/url-strategies but its not working for me please any help will be appreciated thanks
Bellow is my index.html file
<!DOCTYPE html>
<html>
<head>
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
Fore more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="st_anthony_app">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>st_anthony_app</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-messaging.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.4.3/firebase-analytics.js"></script>
<script>
var firebaseConfig = {
apiKey: "xxxxxenter`enter code here`",
authDomain: "xxxxx",
databaseURL: "xxxxx",
projectId: "xxxxx",
storageBucket: "xxxxx",
messagingSenderId: "xxxxx",
appId: "xxxxx",
measurementId: "xxxxx"
};
firebase.initializeApp(firebaseConfig);
</script>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('flutter-first-frame', function () {
navigator.serviceWorker.register('flutter_service_worker.js');
});
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html>

Reference error when bootrapping with data-sap-ui-oninit="module:..."

I wrote a simple SAPUI5 application and deployed it on our ABAP server with help of this blog entry.
It's working fine when the application is running on Tomcat. When I try to launch the application from the ABAP server, however, I get the following error:
I guess it has something to do with the name for the resources but I don't really understand it. The debugger points to the line where I call the index.js file:
data-sap-ui-oninit="module:hendrik/odatabench/index"
Here is the code of my index.html:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-resourceroots='{
"hendrik.odatabench" : "./"
}'
data-sap-ui-oninit="module:hendrik/odatabench/index">
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
Bootstrapping with the attribute sap-ui-oninit='module:...' is supported only as of UI5 1.54 (commit).
UI5 1.28 is quite an ancient version which is out of maintenance. Either update SAPUI5 library in your ABAP system or bootstrap the application by getting the UI5 resources from the CDN:
<script id="sap-ui-bootstrap"
src="https://ui5.sap.com/<version>/resources/sap-ui-core.js"
data-...
></script>
List of currently supported versions can be found here: https://ui5.sap.com/versionoverview.html

Ionic serve does not load angular js and ionic css

I am new in this Ionic field. I created a new app in my localhost folder(C:\xampp\htdocs). When I go to "http://localhost/ionapp/www/" everything works fine but when I run the app from "ionic serve" command I get the blank page.
When I viewed the page source I found that ionic.css and ionic.bundle.js file are not loaded during ionic serve. And in the console I get the error like "angular is not defined". Can anyone please help me fix this?
Here is my index.html which should load css and js files
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
</head>
<body ng-app="starter">
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<!--
The views will be rendered in the <ion-nav-view> directive below
Templates are in the /templates folder (but you could also
have templates inline in this html file if you'd like).
-->
<ion-nav-view></ion-nav-view>
</body>
</html>
So it was not the issue with my ionic but with my browser. Turns out I was getting ERR_CONNECTION_RESET in my console. So basically what I did was
Open cmd prompt as administrator.
Run the command netsh winsock reset.
Restart my computer.
I don't know how it happened but it solved all my problems.

Mobile Hybrid App: Working in browser like chrome,IE etc. But not working any mobile device

I have created a simple project with PhoneJS. i can see output simple project in google chorme and ie etc. i have added this project into xcode 5 use making UIWebview. Builded and install app to iphone 5. i cant see output simple project in any mobile device like iphone 5s and sumsung s4 etc.
index.html
<html>
<head>
<title>Making Change Happen</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.common.css" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.ios.default.css" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.android.holo-dark.css" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.tizen.black.css" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.generic.light.css" />
<link rel="stylesheet" type="text/css" href="lib/css/dx.win8.black.css" />
<script type="text/javascript" src="lib/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="lib/js/knockout-3.0.0.js"></script>
<script type="text/javascript" src="lib/js/globalize.min.js"></script>
<script type="text/javascript" src="lib/js/dx.phonejs.js"></script>
<link rel="dx-template" type="text/html" href="lib/layouts/SlideOut/SlideOutLayout.html" />
<script type="text/javascript" src="lib/layouts/SlideOut/SlideOutLayout.js"></script>
<link rel="stylesheet" type="text/css" href="lib/layouts/SlideOut/SlideOutLayout.css" />
<script type="text/javascript" src="index.js"></script>
<link rel="stylesheet" type="text/css" href="index.css">
<!-- Views -->
<link rel="dx-template" type="text/html" href="views/news/news.html"/>
<script type="text/javascript" src="views/news/news.js"></script>
<link rel="dx-template" type="text/html" href="views/About PES/aboutpes.html"/>
<script type="text/javascript" src="views/About PES/aboutpes.js"></script>
</head>
<body>
</body>
</html>
index.js file
window.AppNamespace = {};
$(function () {
AppNamespace.app = new DevExpress.framework.html.HtmlApplication({
namespace: AppNamespace,
navigationType: 'slideout',
navigation: [
{
title: "News",
action: "#news",
},
{
title: "About PES",
action: "#aboutpes"
}]
});
AppNamespace.app.router.register(":view/:id", { view: "news", id: undefined });
AppNamespace.app.navigate();
});
Try to build package using Visual Studio with DevExtreme installed.
It allows to build native packages for all supported platforms (ios, android, windows phone).
Check out following link
http://help.devexpress.com/DevExtreme/Documentation/Howto/Packaging
If package will be built ok with DevExtreme, then your app is ok, and the problem with the way you do packaging. Will be glad to help you, just try and report the results.