mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-21 08:51:54 +00:00
Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19f4a14056 | ||
|
|
88a58f8af5 | ||
|
|
9e5dafc00e | ||
|
|
0f7cdf6e15 | ||
|
|
0460e9fd78 | ||
|
|
9a792306ca | ||
|
|
86a931c560 | ||
|
|
7e75396715 | ||
|
|
2876a7c9b2 | ||
|
|
2039560edd | ||
|
|
1c4ddaed91 | ||
|
|
27ba5580e2 | ||
|
|
6975b43119 | ||
|
|
8b3d238de6 | ||
|
|
b00151fe41 | ||
|
|
14eaced049 | ||
|
|
f638cbacda | ||
|
|
3fb6c25a99 | ||
|
|
7dce130590 | ||
|
|
bfabadd110 | ||
|
|
63006b6b6b | ||
|
|
d9da06a597 | ||
|
|
eae8102e0d | ||
|
|
2f0de08e9d | ||
|
|
5cf59d6e7f | ||
|
|
3c952f902a | ||
|
|
ac44455352 | ||
|
|
966272451f | ||
|
|
b130f6d837 | ||
|
|
afcf9d5f32 | ||
|
|
2fac7bb55b | ||
|
|
bc980f6378 | ||
|
|
7059bcae53 | ||
|
|
d0a89f6e19 | ||
|
|
21143840e5 | ||
|
|
6dc1f9fb26 |
18
.github/dependabot.yml
vendored
Normal file
18
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Basic dependabot.yml file with
|
||||
# minimum configuration for two package managers
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
# Enable version updates for npm
|
||||
- package-ecosystem: "npm"
|
||||
# Look for `package.json` and `lock` files in the `root` directory
|
||||
directory: "/"
|
||||
# Check the npm registry for updates every day (weekdays)
|
||||
schedule:
|
||||
interval: "daily"
|
||||
# Enable updates to github actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
2
.github/workflows/neocities.yml
vendored
2
.github/workflows/neocities.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
# Set up any tools and build steps here
|
||||
# This example uses a Node.js toolchain to build a site
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2.1.1
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Install deps and build
|
||||
|
||||
32
.github/workflows/release.yml
vendored
Normal file
32
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: npm bump
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
newversion:
|
||||
description: 'npm version (major minor patch)'
|
||||
required: true
|
||||
|
||||
env:
|
||||
node_version: 14
|
||||
|
||||
jobs:
|
||||
version_and_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.2
|
||||
with:
|
||||
# fetch full history so things like auto-changelog work properly
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v2.1.1
|
||||
with:
|
||||
node-version: ${{ env.node_version }}
|
||||
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- uses: bcomnes/npm-bump@v1.0.4
|
||||
with:
|
||||
git_email: bcomnes@gmail.com
|
||||
git_username: ${{ github.actor }}
|
||||
newversion: ${{ github.event.inputs.newversion }}
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
|
||||
publish_cmd: npm run release
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2.1.1
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: npm install && npm test
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ config.json
|
||||
public
|
||||
node_modules
|
||||
tmp_modules
|
||||
package-lock.json
|
||||
|
||||
70
CHANGELOG.md
70
CHANGELOG.md
@@ -7,7 +7,65 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
## [v1.0.8](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.7...v1.0.8) - 2020-03-01
|
||||
## [v1.0.13](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.12...v1.0.13) - 2020-09-11
|
||||
|
||||
### Commits
|
||||
|
||||
- Delete package-lock.json [`88a58f8`](https://github.com/bcomnes/deploy-to-neocities/commit/88a58f8af50d3ac41ce4e523597434adfa6fa304)
|
||||
- Update .gitignore [`9e5dafc`](https://github.com/bcomnes/deploy-to-neocities/commit/9e5dafc00e3910658e768ad1de0a08512399bd51)
|
||||
|
||||
## [v1.0.12](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.11...v1.0.12) - 2020-09-11
|
||||
|
||||
### Merged
|
||||
|
||||
- chore(deps): bump actions/setup-node from v1 to v2.1.1 [`#12`](https://github.com/bcomnes/deploy-to-neocities/pull/12)
|
||||
- chore(deps): bump @actions/core from 1.2.4 to 1.2.5 [`#13`](https://github.com/bcomnes/deploy-to-neocities/pull/13)
|
||||
|
||||
### Commits
|
||||
|
||||
- Create release.yml [`9a79230`](https://github.com/bcomnes/deploy-to-neocities/commit/9a792306ca7b0d9800de1c6e1cb995070caf67df)
|
||||
- Create dependabot.yml [`6975b43`](https://github.com/bcomnes/deploy-to-neocities/commit/6975b431197241de88beb858e612dfc5c37f414f)
|
||||
- Update release.yml [`0460e9f`](https://github.com/bcomnes/deploy-to-neocities/commit/0460e9fd782d26030ab102877961cfe0f0aa7b2e)
|
||||
|
||||
## [v1.0.11](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.10...v1.0.11) - 2020-08-05
|
||||
|
||||
### Merged
|
||||
|
||||
- action.yml: remove invalid syntax [`#11`](https://github.com/bcomnes/deploy-to-neocities/pull/11)
|
||||
- bug: fix import [`#9`](https://github.com/bcomnes/deploy-to-neocities/pull/9)
|
||||
|
||||
### Fixed
|
||||
|
||||
- action.yml: remove invalid syntax [`#10`](https://github.com/bcomnes/deploy-to-neocities/issues/10)
|
||||
|
||||
### Commits
|
||||
|
||||
- Update README.md [`bfabadd`](https://github.com/bcomnes/deploy-to-neocities/commit/bfabadd110556a72b29314df1349f4efb3e1566c)
|
||||
- Update README.md [`63006b6`](https://github.com/bcomnes/deploy-to-neocities/commit/63006b6b6bbb3276fd1130b23398c468196dc34b)
|
||||
- Update README.md [`7dce130`](https://github.com/bcomnes/deploy-to-neocities/commit/7dce130590457fee0823c708884cb309fedc140c)
|
||||
|
||||
## [v1.0.10](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.9...v1.0.10) - 2020-04-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- bug: fix import [`#8`](https://github.com/bcomnes/deploy-to-neocities/issues/8)
|
||||
|
||||
## [v1.0.9](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.8...v1.0.9) - 2020-04-30
|
||||
|
||||
### Merged
|
||||
|
||||
- Update auto-changelog to the latest version 🚀 [`#6`](https://github.com/bcomnes/deploy-to-neocities/pull/6)
|
||||
- Update @actions/core to the latest version 🚀 [`#7`](https://github.com/bcomnes/deploy-to-neocities/pull/7)
|
||||
- Update @zeit/ncc to the latest version 🚀 [`#5`](https://github.com/bcomnes/deploy-to-neocities/pull/5)
|
||||
- Update @actions/core to the latest version 🚀 [`#4`](https://github.com/bcomnes/deploy-to-neocities/pull/4)
|
||||
|
||||
### Commits
|
||||
|
||||
- Fix semver ranges for runtime deps [`ac44455`](https://github.com/bcomnes/deploy-to-neocities/commit/ac444553521612a3cab840b54287356c2e585971)
|
||||
- fix(package): update @actions/core to version 1.2.4 [`bc980f6`](https://github.com/bcomnes/deploy-to-neocities/commit/bc980f6378b06e225a7854b65ef9de27838eba18)
|
||||
- chore(package): update auto-changelog to version 2.0.0 [`7059bca`](https://github.com/bcomnes/deploy-to-neocities/commit/7059bcae5305d0068f02b2268f76e626ff0a940a)
|
||||
|
||||
## [v1.0.8](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.7...v1.0.8) - 2020-02-29
|
||||
|
||||
### Merged
|
||||
|
||||
@@ -57,19 +115,19 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
- refactor: clean up pacakge.json a bit [`7bb0bde`](https://github.com/bcomnes/deploy-to-neocities/commit/7bb0bdec75f6ec26707d036479c84b40f20f6ba8)
|
||||
- docs: improve docs [`cc11705`](https://github.com/bcomnes/deploy-to-neocities/commit/cc11705059c58406f070b67a4f3456a040599ae5)
|
||||
|
||||
## [v1.0.2](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.1...v1.0.2) - 2020-02-18
|
||||
## [v1.0.2](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.1...v1.0.2) - 2020-02-17
|
||||
|
||||
### Commits
|
||||
|
||||
- bug: fix input name [`14f0fea`](https://github.com/bcomnes/deploy-to-neocities/commit/14f0feaed2b52c65b7a9fac2a8c5437f75a3b033)
|
||||
|
||||
## [v1.0.1](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.0...v1.0.1) - 2020-02-18
|
||||
## [v1.0.1](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.0...v1.0.1) - 2020-02-17
|
||||
|
||||
### Commits
|
||||
|
||||
- docs: typos [`91c25ab`](https://github.com/bcomnes/deploy-to-neocities/commit/91c25ab7221a139f318ed7ef4a6518d5a64debe8)
|
||||
|
||||
## [v1.0.0](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.11...v1.0.0) - 2020-02-18
|
||||
## [v1.0.0](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.11...v1.0.0) - 2020-02-17
|
||||
|
||||
### Merged
|
||||
|
||||
@@ -129,14 +187,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
- refactor: Dramatically simplify logging [`bc86874`](https://github.com/bcomnes/deploy-to-neocities/commit/bc86874ede188f9c33f0b6dfd2e54b25328b1285)
|
||||
|
||||
## [v0.0.3](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.2...v0.0.3) - 2020-02-13
|
||||
## [v0.0.3](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.2...v0.0.3) - 2020-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
- Fix boolean parsing [`19246fa`](https://github.com/bcomnes/deploy-to-neocities/commit/19246fac798151a3ab80666412f72394c0615c32)
|
||||
- bug: Fix reference bug in logging [`2c52eea`](https://github.com/bcomnes/deploy-to-neocities/commit/2c52eeaa2badbb1bcb3c2520e358fcc088bc3879)
|
||||
|
||||
## [v0.0.2](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.1...v0.0.2) - 2020-02-13
|
||||
## [v0.0.2](https://github.com/bcomnes/deploy-to-neocities/compare/v0.0.1...v0.0.2) - 2020-02-12
|
||||
|
||||
### Commits
|
||||
|
||||
|
||||
11
README.md
11
README.md
@@ -7,7 +7,7 @@
|
||||
|
||||
<center><img src="static/logo.png"></center>
|
||||
|
||||
Efficiently deploy a website to [Neocities][nc] using [Github actions](https://github.com/features/actions).
|
||||
Efficiently deploy a website to [Neocities][nc] using [Github actions](https://github.com/features/actions). Uses content aware diffing to only update files that changed.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -104,12 +104,21 @@ None.
|
||||
- No deploy previews.
|
||||
- No Github Deploys API support (yet).
|
||||
|
||||
## Sites using deploy-to-neocities
|
||||
|
||||
- https://github.com/bcomnes/bret.io ([bret.io](https://bret.io))
|
||||
- https://github.com/ecomnes/elenacomnes.com ([elenacomnes.comnes](https://elenacomnes.com))
|
||||
- https://github.com/gumcast/gumcast-client ([gumcast.com](https://gumcast.com))
|
||||
- https://github.com/bcomnes/deploy-to-neocities/blob/master/.github/workflows/neocities.yml ([deploy-to-neocities.neocities.org](https://deploy-to-neocities.neocities.org))
|
||||
- [Zambonifofex/stories](https://github.com/Zambonifofex/stories) ([zamstories.neocities.org](https://zamstories.neocities.org))
|
||||
- ...PR your site when you set it up!
|
||||
|
||||
## See also
|
||||
|
||||
- [async-neocities](https://ghub.io/async-neocities): diffing engine used for action.
|
||||
- [Neocities API Docs](https://neocities.org/api)
|
||||
- [neocities/neocities-node](https://github.com/neocities/neocities-node): Official Node API
|
||||
- [jonchang/deploy-neocities](https://github.com/jonchang/deploy-neocities): An alternative docker + official ruby client based action similar to this one.
|
||||
|
||||
[qs]: https://ghub.io/qs
|
||||
[nf]: https://ghub.io/node-fetch
|
||||
|
||||
@@ -15,7 +15,6 @@ inputs:
|
||||
description: Delete orphaned files on neocities that don't exist in distDir
|
||||
default: false
|
||||
required: true
|
||||
outputs: # none
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
||||
320
dist/index.js
vendored
320
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
53
dist/sourcemap-register.js
vendored
53
dist/sourcemap-register.js
vendored
@@ -19,7 +19,13 @@ module.exports =
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/ var threw = true;
|
||||
/******/ try {
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/ threw = false;
|
||||
/******/ } finally {
|
||||
/******/ if(threw) delete installedModules[moduleId];
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
@@ -578,7 +584,7 @@ function retrieveSourceMapURL(source) {
|
||||
|
||||
// Get the URL of the source map
|
||||
fileData = retrieveFile(source);
|
||||
var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;
|
||||
var re = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/mg;
|
||||
// Keep executing the search to find the *last* sourceMappingURL to avoid
|
||||
// picking up sourceMappingURLs from comments, strings, etc.
|
||||
var lastMatch, match;
|
||||
@@ -651,7 +657,7 @@ function mapSourcePosition(position) {
|
||||
}
|
||||
|
||||
// Resolve the source URL relative to the URL of the source map
|
||||
if (sourceMap && sourceMap.map && typeof sourceMap.map.originalPositionFor === 'function') {
|
||||
if (sourceMap && sourceMap.map) {
|
||||
var originalPosition = sourceMap.map.originalPositionFor(position);
|
||||
|
||||
// Only return the original position if a matching line was found. If no
|
||||
@@ -776,13 +782,8 @@ function cloneCallSite(frame) {
|
||||
return object;
|
||||
}
|
||||
|
||||
function wrapCallSite(frame, state) {
|
||||
// provides interface backward compatibility
|
||||
if (state === undefined) {
|
||||
state = { nextPosition: null, curPosition: null }
|
||||
}
|
||||
function wrapCallSite(frame) {
|
||||
if(frame.isNative()) {
|
||||
state.curPosition = null;
|
||||
return frame;
|
||||
}
|
||||
|
||||
@@ -796,11 +797,7 @@ function wrapCallSite(frame, state) {
|
||||
|
||||
// Fix position in Node where some (internal) code is prepended.
|
||||
// See https://github.com/evanw/node-source-map-support/issues/36
|
||||
// Header removed in node at ^10.16 || >=11.11.0
|
||||
// v11 is not an LTS candidate, we can just test the one version with it.
|
||||
// Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11
|
||||
var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
|
||||
var headerLength = noHeader.test(process.version) ? 0 : 62;
|
||||
var headerLength = 62;
|
||||
if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
|
||||
column -= headerLength;
|
||||
}
|
||||
@@ -810,15 +807,9 @@ function wrapCallSite(frame, state) {
|
||||
line: line,
|
||||
column: column
|
||||
});
|
||||
state.curPosition = position;
|
||||
frame = cloneCallSite(frame);
|
||||
var originalFunctionName = frame.getFunctionName;
|
||||
frame.getFunctionName = function() {
|
||||
if (state.nextPosition == null) {
|
||||
return originalFunctionName();
|
||||
}
|
||||
return state.nextPosition.name || originalFunctionName();
|
||||
};
|
||||
frame.getFunctionName = function() { return position.name || originalFunctionName(); };
|
||||
frame.getFileName = function() { return position.source; };
|
||||
frame.getLineNumber = function() { return position.line; };
|
||||
frame.getColumnNumber = function() { return position.column + 1; };
|
||||
@@ -840,25 +831,16 @@ function wrapCallSite(frame, state) {
|
||||
}
|
||||
|
||||
// This function is part of the V8 stack trace API, for more info see:
|
||||
// https://v8.dev/docs/stack-trace-api
|
||||
// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
||||
function prepareStackTrace(error, stack) {
|
||||
if (emptyCacheBetweenOperations) {
|
||||
fileContentsCache = {};
|
||||
sourceMapCache = {};
|
||||
}
|
||||
|
||||
var name = error.name || 'Error';
|
||||
var message = error.message || '';
|
||||
var errorString = name + ": " + message;
|
||||
|
||||
var state = { nextPosition: null, curPosition: null };
|
||||
var processedStack = [];
|
||||
for (var i = stack.length - 1; i >= 0; i--) {
|
||||
processedStack.push('\n at ' + wrapCallSite(stack[i], state));
|
||||
state.nextPosition = state.curPosition;
|
||||
}
|
||||
state.curPosition = state.nextPosition = null;
|
||||
return errorString + processedStack.reverse().join('');
|
||||
return error + stack.map(function(frame) {
|
||||
return '\n at ' + wrapCallSite(frame);
|
||||
}).join('');
|
||||
}
|
||||
|
||||
// Generate position and snippet of original source with pointer
|
||||
@@ -1022,9 +1004,6 @@ exports.resetRetrieveHandlers = function() {
|
||||
|
||||
retrieveFileHandlers = originalRetrieveFileHandlers.slice(0);
|
||||
retrieveMapHandlers = originalRetrieveMapHandlers.slice(0);
|
||||
|
||||
retrieveSourceMap = handlerExec(retrieveMapHandlers);
|
||||
retrieveFile = handlerExec(retrieveFileHandlers);
|
||||
}
|
||||
|
||||
|
||||
|
||||
2
index.js
2
index.js
@@ -3,7 +3,7 @@ const core = require('@actions/core')
|
||||
const Neocities = require('async-neocities')
|
||||
const path = require('path')
|
||||
const ms = require('ms')
|
||||
const assert = require('nanoassert')
|
||||
const assert = require('webassert').default
|
||||
const fsp = require('fs').promises
|
||||
|
||||
async function doDeploy () {
|
||||
|
||||
12
package.json
12
package.json
@@ -1,20 +1,20 @@
|
||||
{
|
||||
"name": "deploy-to-neocities",
|
||||
"description": "Github Action to deplpoy a folder to Neocities.org",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.13",
|
||||
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io/)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bcomnes/deploy-to-neocities/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "1.2.2",
|
||||
"@actions/core": "1.2.5",
|
||||
"async-neocities": "1.1.6",
|
||||
"ms": "^2.1.2",
|
||||
"nanoassert": "^2.0.0"
|
||||
"webassert": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@zeit/ncc": "^0.21.1",
|
||||
"auto-changelog": "^1.16.2",
|
||||
"auto-changelog": "^2.0.0",
|
||||
"@zeit/ncc": "^0.22.0",
|
||||
"budo": "^11.6.3",
|
||||
"cpx2": "^2.0.0",
|
||||
"dependency-check": "^4.1.0",
|
||||
@@ -38,7 +38,7 @@
|
||||
"build:md": "sitedown . -b public -l layout.html",
|
||||
"build:static": "cpx './**/*.{png,ico}' public",
|
||||
"clean": "rimraf public && mkdirp public",
|
||||
"release": "git push --follow-tags && gh-release",
|
||||
"release": "git push --follow-tags && gh-release -y",
|
||||
"start": "npm run watch",
|
||||
"test": "run-s test:*",
|
||||
"test:deps": "dependency-check . --no-dev --no-peer",
|
||||
|
||||
Reference in New Issue
Block a user