mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-21 08:51:54 +00:00
Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44798856b1 | ||
|
|
e5cdffd285 | ||
|
|
2e14724f72 | ||
|
|
269cea9a85 | ||
|
|
b05435526e | ||
|
|
c141314092 | ||
|
|
5376b1e544 | ||
|
|
c5b9053826 | ||
|
|
c20b64ec3a | ||
|
|
dc4d4eeff9 | ||
|
|
d2a405bb36 | ||
|
|
73581be8da | ||
|
|
3050c92cd1 | ||
|
|
14bee33aca | ||
|
|
01a9dd76fb | ||
|
|
ea2f09c886 | ||
|
|
e51d6e0f99 | ||
|
|
be68564ed0 | ||
|
|
23f364e349 | ||
|
|
33ef0e7fab | ||
|
|
94fb156784 | ||
|
|
44e467a189 | ||
|
|
17d6a4b01b | ||
|
|
f5e446cd23 | ||
|
|
d551e2e3dc | ||
|
|
1f6ee0a605 | ||
|
|
3d49a264a5 | ||
|
|
87f22c65f9 | ||
|
|
47edf7607e | ||
|
|
c51b62c31b | ||
|
|
7c7e9080c0 | ||
|
|
b2793d2827 | ||
|
|
cadbbff700 | ||
|
|
15d3299d41 | ||
|
|
64c177bb7c | ||
|
|
b0315b3ae6 | ||
|
|
c1d930633a | ||
|
|
606f4dafbe | ||
|
|
96bb73cc55 | ||
|
|
fcce66f4d9 | ||
|
|
eb27830b09 | ||
|
|
eedc025255 | ||
|
|
362544ea65 | ||
|
|
f942ee85ee | ||
|
|
06656fc11f | ||
|
|
e3a5a21e0f | ||
|
|
98ed70e10b | ||
|
|
4651b4e6a6 | ||
|
|
e95b2b3a31 | ||
|
|
6a1edb8f7c | ||
|
|
b34dbdf936 | ||
|
|
3e3947a94e | ||
|
|
c10801ca7d | ||
|
|
c29ab1ac72 | ||
|
|
bf078bf3d1 | ||
|
|
5346499faa | ||
|
|
ebebe2f466 | ||
|
|
0a714c56e7 | ||
|
|
085e43c0f6 | ||
|
|
a681c7b834 | ||
|
|
0e025d4443 | ||
|
|
0f708da077 | ||
|
|
2f93b28470 | ||
|
|
c97c0f1d29 | ||
|
|
bd95686640 | ||
|
|
26e9f892dc | ||
|
|
44344826ee | ||
|
|
07e0747714 | ||
|
|
de4011a7a2 | ||
|
|
963a76669c |
15
.github/workflows/neocities.yml
vendored
15
.github/workflows/neocities.yml
vendored
@@ -11,21 +11,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2.3.4
|
||||
# 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@v2.1.1
|
||||
uses: actions/setup-node@v2.4.0
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Install deps and build
|
||||
run: |
|
||||
npm i
|
||||
npm run build
|
||||
node-version: 15
|
||||
- run: npm i
|
||||
- run: npm run build
|
||||
# When the dist_dir is ready, deploy it to neocities
|
||||
- name: Deploy to neocities
|
||||
uses: bcomnes/deploy-to-neocities@master # dont use master in production
|
||||
with:
|
||||
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
|
||||
cleanup: false
|
||||
cleanup: true
|
||||
dist_dir: public
|
||||
protected_files: 'dropbox/*'
|
||||
|
||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -14,16 +14,18 @@ jobs:
|
||||
version_and_release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.2
|
||||
- uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
# fetch full history so things like auto-changelog work properly
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v2.1.1
|
||||
- uses: actions/setup-node@v2.4.0
|
||||
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
|
||||
- run: npm i
|
||||
- run: npm test
|
||||
- uses: bcomnes/npm-bump@v2.0.2
|
||||
with:
|
||||
git_email: bcomnes@gmail.com
|
||||
git_username: ${{ github.actor }}
|
||||
|
||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: tests
|
||||
|
||||
on: [push]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -9,17 +9,22 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node: [12]
|
||||
node: [15]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v2.1.1
|
||||
uses: actions/setup-node@v2.4.0
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- name: npm install && npm test
|
||||
run: |
|
||||
npm i
|
||||
npm test
|
||||
env:
|
||||
CI: true
|
||||
- run: npm i
|
||||
- run: npm test
|
||||
|
||||
automerge:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: fastify/github-action-merge-dependabot@v2.4.0
|
||||
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' && contains(github.head_ref, 'dependabot/github_actions') }}
|
||||
with:
|
||||
github-token: ${{secrets.github_token}}
|
||||
|
||||
17
.vscode/launch.json
vendored
17
.vscode/launch.json
vendored
@@ -1,17 +0,0 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"program": "${workspaceFolder}/test.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
81
CHANGELOG.md
81
CHANGELOG.md
@@ -7,6 +7,87 @@ 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.1.1](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.0...v1.1.1)
|
||||
|
||||
### Merged
|
||||
|
||||
- chore(deps): bump @actions/core from 1.4.0 to 1.5.0 [`#50`](https://github.com/bcomnes/deploy-to-neocities/pull/50)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#49`](https://github.com/bcomnes/deploy-to-neocities/pull/49)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#48`](https://github.com/bcomnes/deploy-to-neocities/pull/48)
|
||||
- chore(deps): bump actions/setup-node from 2.3.2 to 2.4.0 [`#47`](https://github.com/bcomnes/deploy-to-neocities/pull/47)
|
||||
- chore(deps): bump actions/setup-node from 2.3.1 to 2.3.2 [`#46`](https://github.com/bcomnes/deploy-to-neocities/pull/46)
|
||||
- chore(deps): bump actions/setup-node from 2.3.0 to 2.3.1 [`#45`](https://github.com/bcomnes/deploy-to-neocities/pull/45)
|
||||
- chore(deps): bump actions/setup-node from 2.2.0 to 2.3.0 [`#44`](https://github.com/bcomnes/deploy-to-neocities/pull/44)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#43`](https://github.com/bcomnes/deploy-to-neocities/pull/43)
|
||||
- chore(deps): bump actions/setup-node from 2.1.5 to 2.2.0 [`#42`](https://github.com/bcomnes/deploy-to-neocities/pull/42)
|
||||
- chore(deps): bump @actions/core from 1.3.0 to 1.4.0 [`#41`](https://github.com/bcomnes/deploy-to-neocities/pull/41)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#40`](https://github.com/bcomnes/deploy-to-neocities/pull/40)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#39`](https://github.com/bcomnes/deploy-to-neocities/pull/39)
|
||||
- chore(deps): bump @actions/core from 1.2.7 to 1.3.0 [`#38`](https://github.com/bcomnes/deploy-to-neocities/pull/38)
|
||||
- chore(deps-dev): bump gh-release from 5.0.2 to 6.0.0 [`#37`](https://github.com/bcomnes/deploy-to-neocities/pull/37)
|
||||
- chore(deps): bump actions/checkout from 2 to 2.3.4 [`#36`](https://github.com/bcomnes/deploy-to-neocities/pull/36)
|
||||
- chore(deps): bump @actions/core from 1.2.6 to 1.2.7 [`#35`](https://github.com/bcomnes/deploy-to-neocities/pull/35)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot from v1.2.1 to v2.0.0 [`#34`](https://github.com/bcomnes/deploy-to-neocities/pull/34)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot [`#33`](https://github.com/bcomnes/deploy-to-neocities/pull/33)
|
||||
- chore(deps): bump fastify/github-action-merge-dependabot from v1.1.1 to v1.2.0 [`#32`](https://github.com/bcomnes/deploy-to-neocities/pull/32)
|
||||
- chore(deps): bump actions/setup-node from v2.1.4 to v2.1.5 [`#31`](https://github.com/bcomnes/deploy-to-neocities/pull/31)
|
||||
|
||||
### Commits
|
||||
|
||||
- Update README.md [`c20b64e`](https://github.com/bcomnes/deploy-to-neocities/commit/c20b64ec3ad139d92da5bd9d956cd86bd3786850)
|
||||
|
||||
## [v1.1.0](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.17...v1.1.0) - 2021-01-17
|
||||
|
||||
### Commits
|
||||
|
||||
- Add a protected_files input that accepts a minimatch glob [`cadbbff`](https://github.com/bcomnes/deploy-to-neocities/commit/cadbbff70037001f49c979fa34e897efac8ab455)
|
||||
- fix site static glob [`7c7e908`](https://github.com/bcomnes/deploy-to-neocities/commit/7c7e9080c03ebfe9f1517c579e38245260ce4f0b)
|
||||
- clean up [`b2793d2`](https://github.com/bcomnes/deploy-to-neocities/commit/b2793d2827cbd21b3b2f38ac7a2da6ffafb7fcc8)
|
||||
|
||||
## [v1.0.17](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.16...v1.0.17) - 2021-01-17
|
||||
|
||||
### Merged
|
||||
|
||||
- Fix problems with large deploys by updating to async-neocities 2.0.0 [`#30`](https://github.com/bcomnes/deploy-to-neocities/pull/30)
|
||||
- Adding Neofeed! [`#29`](https://github.com/bcomnes/deploy-to-neocities/pull/29)
|
||||
|
||||
### Commits
|
||||
|
||||
- Use standard breaking change identifier [`64c177b`](https://github.com/bcomnes/deploy-to-neocities/commit/64c177bb7cb6c7cc33e53c6198218e02be928a61)
|
||||
|
||||
## [v1.0.16](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.15...v1.0.16) - 2021-01-04
|
||||
|
||||
### Merged
|
||||
|
||||
- chore(deps): bump ms from 2.1.2 to 2.1.3 [`#27`](https://github.com/bcomnes/deploy-to-neocities/pull/27)
|
||||
|
||||
### Commits
|
||||
|
||||
- Update README.md [`362544e`](https://github.com/bcomnes/deploy-to-neocities/commit/362544ea6507553a7155f083e222c502f1863663)
|
||||
|
||||
## [v1.0.15](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.14...v1.0.15) - 2021-01-03
|
||||
|
||||
### Merged
|
||||
|
||||
- Clarify usage instructions [`#26`](https://github.com/bcomnes/deploy-to-neocities/pull/26)
|
||||
- chore(deps): bump actions/setup-node from v2.1.3 to v2.1.4 [`#25`](https://github.com/bcomnes/deploy-to-neocities/pull/25)
|
||||
- chore(deps): bump actions/setup-node from v2.1.2 to v2.1.3 [`#23`](https://github.com/bcomnes/deploy-to-neocities/pull/23)
|
||||
- chore(deps-dev): bump sitedown from 4.0.0 to 5.0.0 [`#24`](https://github.com/bcomnes/deploy-to-neocities/pull/24)
|
||||
- chore(deps-dev): bump standard from 15.0.1 to 16.0.0 [`#22`](https://github.com/bcomnes/deploy-to-neocities/pull/22)
|
||||
- chore(deps-dev): bump standard from 14.3.4 to 15.0.0 [`#21`](https://github.com/bcomnes/deploy-to-neocities/pull/21)
|
||||
- chore(deps): bump bcomnes/npm-bump from v2.0.1 to v2.0.2 [`#20`](https://github.com/bcomnes/deploy-to-neocities/pull/20)
|
||||
- chore(deps): bump actions/setup-node from v2.1.1 to v2.1.2 [`#19`](https://github.com/bcomnes/deploy-to-neocities/pull/19)
|
||||
- chore(deps): bump @actions/core from 1.2.5 to 1.2.6 [`#18`](https://github.com/bcomnes/deploy-to-neocities/pull/18)
|
||||
- chore(deps-dev): bump cpx2 from 2.0.0 to 3.0.0 [`#17`](https://github.com/bcomnes/deploy-to-neocities/pull/17)
|
||||
- chore(deps): bump bcomnes/npm-bump from v1.0.5 to v2.0.0 [`#16`](https://github.com/bcomnes/deploy-to-neocities/pull/16)
|
||||
- chore(deps): bump bcomnes/npm-bump from v1.0.4 to v1.0.5 [`#14`](https://github.com/bcomnes/deploy-to-neocities/pull/14)
|
||||
|
||||
### Commits
|
||||
|
||||
- Print file stats when things error. [`06656fc`](https://github.com/bcomnes/deploy-to-neocities/commit/06656fc11f192e070e32acf845e0631d792ee424)
|
||||
- Update test.yml [`e95b2b3`](https://github.com/bcomnes/deploy-to-neocities/commit/e95b2b3a311c11aa7a114d96f773013eef154f52)
|
||||
- Update release.yml [`4434482`](https://github.com/bcomnes/deploy-to-neocities/commit/44344826ee59da570fa6d5ca8285cd67693cc6aa)
|
||||
|
||||
## [v1.0.14](https://github.com/bcomnes/deploy-to-neocities/compare/v1.0.13...v1.0.14) - 2020-09-14
|
||||
|
||||
### Merged
|
||||
|
||||
33
README.md
33
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). Uses content aware diffing to only update files that changed.
|
||||
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
|
||||
|
||||
@@ -48,15 +48,17 @@ jobs:
|
||||
- 💻 [Example YML](.github/workflows/neocities.yml)
|
||||
- 🌎 [Example Deploy](https://deploy-to-neocities.neocities.org)
|
||||
|
||||
Create a workflow `.yml` file in your repositories `.github/workflows` directory. An [example workflow](#example-workflow) is available below. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
|
||||
Create a workflow `.yml` file in your repository's `.github/workflows` directory. An [example workflow](#example-workflow) is available above. For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
|
||||
|
||||
Get your sites API token and set a [secret][sec] called `NEOCITIES_API_TOKEN`. Set the `api_token` input on your `deploy-to-neocities` action to `NEOCITIES_API_TOKEN`.
|
||||
You'll need the API token for your site. Go to:
|
||||
|
||||
```
|
||||
https://neocities.org/settings/{{sitename}}#api_key
|
||||
https://neocities.org/settings/{{your-sitename}}#api_key
|
||||
```
|
||||
|
||||
During your workflow, generate the files you want to deploy to [Neocities][nc] into a `dist_dir` directory. You can use any tools that can be installed or brought into the Github actions environment.
|
||||
Get your site's API token. In your GitHub repository, set a [secret][sec] called `NEOCITIES_API_TOKEN`. Set the `api_token` input on your `deploy-to-neocities` action to `${{ secrets.NEOCITIES_API_TOKEN }}` as in the example above.
|
||||
|
||||
During your workflow, generate the files you want to deploy to [Neocities][nc] into a directory. Set this as the `dist_dir` directory in your workflow (the default is `public`). You can use any tools to generate your site that can be installed or brought into the Github actions environment.
|
||||
|
||||
Once the build is complete, `deploy-to-neocities` will efficiently upload all new and all changed files to Neocities. Any files on Neocities that don't exist in the `dist_dir` are considered 'orphaned' files. To destructively remove these 'orphaned' files, set the `cleanup` input to `true`.
|
||||
|
||||
@@ -67,6 +69,7 @@ You most likely only want to run this on the `master` branch so that only change
|
||||
- `api_token` (**REQUIRED**): The API token for your [Neocities][nc] website to deploy to.
|
||||
- `dist_dir`: The directory to deploy to [Neocities][nc]. Default: `public`.
|
||||
- `cleanup`: Boolean string (`true` or `false`). If `true`, `deploy-to-neocities` will destructively delete files found on [Neocities][nc] not found in your `dist_dir`. Default: `false`.
|
||||
- `protected_files`: An optional glob string used to mark files as protected. Protected files are never cleaned up. Test this option out with `cleanup` set to false before relying on it. Protected files are printed when `cleanup` is set to true or false. Glob strings are processed by [minimatch](https://github.com/isaacs/minimatch) against remote neocities file paths. Protected files can still be updated.
|
||||
|
||||
### Outputs
|
||||
|
||||
@@ -106,11 +109,27 @@ None.
|
||||
|
||||
## Sites using deploy-to-neocities
|
||||
|
||||
(Some may be NSFW)
|
||||
|
||||
- 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))
|
||||
- [Your Neofeed](https://github.com/victoriadrake/neocities-neofeed), (っ◔◡◔)っ a personal timeline for Neocities and GitHub Pages.
|
||||
- https://punkedwerewolf.net
|
||||
- https://speakscribe.com
|
||||
- https://geno7.neocities.org
|
||||
- https://github.com/M1ssM0ss/deploy-to-neocities-template
|
||||
- https://nelson.neocities.org
|
||||
- https://flamedfury.com
|
||||
- https://keb.neocities.org
|
||||
- https://missmoss.neocities.org
|
||||
- https://fuckingwebmaster.net
|
||||
- https://rarebit.neocities.org
|
||||
- https://cavacado.neocities.org
|
||||
- https://wanderinginn.neocities.org
|
||||
- https://andri.dk/blog/2021/deploy-static-websites-anywhere
|
||||
- ...PR your site when you set it up!
|
||||
|
||||
## See also
|
||||
@@ -120,6 +139,10 @@ None.
|
||||
- [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.
|
||||
|
||||
## CHANGELOG
|
||||
|
||||
See [changelog.md](CHANGELOG.md)
|
||||
|
||||
[qs]: https://ghub.io/qs
|
||||
[nf]: https://ghub.io/node-fetch
|
||||
[fd]: https://ghub.io/form-data
|
||||
|
||||
@@ -15,6 +15,9 @@ inputs:
|
||||
description: Delete orphaned files on neocities that don't exist in distDir
|
||||
default: false
|
||||
required: true
|
||||
protected_files:
|
||||
description: A glob string that prevents matched files from ever being deleted.
|
||||
required: false
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
||||
3819
dist/index.js
vendored
3819
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
28
index.js
28
index.js
@@ -5,11 +5,15 @@ const path = require('path')
|
||||
const ms = require('ms')
|
||||
const assert = require('webassert').default
|
||||
const fsp = require('fs').promises
|
||||
const minimatch = require('minimatch')
|
||||
|
||||
let cleanup
|
||||
|
||||
async function doDeploy () {
|
||||
const token = core.getInput('api_token')
|
||||
const distDir = path.join(process.cwd(), core.getInput('dist_dir'))
|
||||
const cleanup = JSON.parse(core.getInput('cleanup'))
|
||||
cleanup = JSON.parse(core.getInput('cleanup'))
|
||||
const protectedFilesGlob = core.getInput('protected_files')
|
||||
|
||||
assert(typeof cleanup === 'boolean', 'Cleanup input must be a boolean "true" or "false"')
|
||||
const stat = await fsp.stat(distDir)
|
||||
@@ -17,18 +21,36 @@ async function doDeploy () {
|
||||
|
||||
const client = new Neocities(token)
|
||||
|
||||
const stats = await client.deploy(distDir, {
|
||||
const deployOpts = {
|
||||
cleanup,
|
||||
statsCb: Neocities.statsHandler()
|
||||
})
|
||||
}
|
||||
|
||||
if (protectedFilesGlob) deployOpts.protectedFileFilter = minimatch.filter(protectedFilesGlob)
|
||||
|
||||
const stats = await client.deploy(distDir, deployOpts)
|
||||
|
||||
console.log(`Deployed to Neocities in ${ms(stats.time)}:`)
|
||||
console.log(` Uploaded ${stats.filesToUpload.length} files`)
|
||||
console.log(` ${cleanup ? 'Deleted' : 'Orphaned'} ${stats.filesToDelete.length} files`)
|
||||
console.log(` Skipped ${stats.filesSkipped.length} files`)
|
||||
console.log(` ${stats.protectedFiles.length} protected files:`)
|
||||
if (stats.protectedFiles.length) {
|
||||
console.log(stats.protectedFiles)
|
||||
}
|
||||
}
|
||||
|
||||
doDeploy().catch(err => {
|
||||
console.error(err)
|
||||
if (err.stats) {
|
||||
console.log('Files to upload: ')
|
||||
console.dir(err.stats.filesToUpload, { colors: true, depth: 999 })
|
||||
|
||||
if (cleanup) {
|
||||
console.log('Files to delete: ')
|
||||
console.dir(err.stats.filesToDelete, { colors: true, depth: 999 })
|
||||
}
|
||||
}
|
||||
|
||||
core.setFailed(err.message)
|
||||
})
|
||||
|
||||
23
package.json
23
package.json
@@ -1,27 +1,28 @@
|
||||
{
|
||||
"name": "deploy-to-neocities",
|
||||
"description": "Github Action to deplpoy a folder to Neocities.org",
|
||||
"version": "1.0.14",
|
||||
"version": "1.1.1",
|
||||
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io/)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bcomnes/deploy-to-neocities/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "1.2.5",
|
||||
"async-neocities": "1.1.6",
|
||||
"ms": "^2.1.2",
|
||||
"webassert": "^3.0.2"
|
||||
"@actions/core": "1.5.0",
|
||||
"async-neocities": "2.1.1",
|
||||
"minimatch": "^3.0.4",
|
||||
"ms": "2.1.3",
|
||||
"webassert": "3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"auto-changelog": "^2.0.0",
|
||||
"@zeit/ncc": "^0.22.0",
|
||||
"budo": "^11.6.3",
|
||||
"cpx2": "^2.0.0",
|
||||
"cpx2": "^3.0.0",
|
||||
"dependency-check": "^4.1.0",
|
||||
"gh-release": "^4.0.0",
|
||||
"gh-release": "^6.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"sitedown": "^4.0.0",
|
||||
"standard": "^14.3.1"
|
||||
"sitedown": "^5.0.0",
|
||||
"standard": "^16.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/bcomnes/deploy-to-neocities#readme",
|
||||
"keywords": [],
|
||||
@@ -36,7 +37,7 @@
|
||||
"build": "npm run clean && run-p build:*",
|
||||
"build:action": "rm -rf dist && ncc build index.js -o dist -s",
|
||||
"build:md": "sitedown . -b public -l layout.html",
|
||||
"build:static": "cpx './**/*.{png,ico}' public",
|
||||
"build:static": "cpx './!(node_modules)**/*.{png,ico}' public",
|
||||
"clean": "rimraf public && mkdirp public",
|
||||
"release": "git push --follow-tags && gh-release -y",
|
||||
"start": "npm run watch",
|
||||
@@ -45,7 +46,7 @@
|
||||
"test:standard": "standard",
|
||||
"version": "run-s version:*",
|
||||
"version:build": "npm run build:action && git add dist",
|
||||
"version:changelog": "auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern 'BREAKING:' && git add CHANGELOG.md",
|
||||
"version:changelog": "auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern 'BREAKING CHANGE:' && git add CHANGELOG.md",
|
||||
"watch": "npm run clean && run-p watch:*",
|
||||
"watch:js": "budo --dir public --live --open",
|
||||
"watch:md": "npm run build:md -- -w",
|
||||
|
||||
Reference in New Issue
Block a user