Chore: deploy via forgejo actions (dryrun)
Some checks failed
/ deploy_on_hetzner_single (push) Failing after 11m3s
Some checks failed
/ deploy_on_hetzner_single (push) Failing after 11m3s
This commit is contained in:
parent
340f256074
commit
bc09f8a719
4 changed files with 38 additions and 4 deletions
13
.forgejo/workflows/config/config.json
Normal file
13
.forgejo/workflows/config/config.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"cacheDir": "./cache",
|
||||
"mastodonAuth": {
|
||||
"url": "https://en.osm.town/",
|
||||
"timeout": 60000
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"showTopContributors": true,
|
||||
"showTopThemes": true
|
||||
}
|
||||
]
|
||||
}
|
22
.forgejo/workflows/mapcomplete_edits_en_osm_town.yml
Normal file
22
.forgejo/workflows/mapcomplete_edits_en_osm_town.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
deploy_on_hetzner_single:
|
||||
runs-on: [ ubuntu-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: "npm"
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: install deps
|
||||
run: npm ci
|
||||
shell: bash
|
||||
|
||||
- name: Create mapcomplete edits overview
|
||||
shell: bash
|
||||
run: ts-node src/index.ts -- ./.forgejo/workflows/config/config.json ${{ secrets.MAPCOMPLETE_EDITS_EN_OSM_TOWN }} --dry-run
|
|
@ -16,8 +16,7 @@
|
|||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "tslint --project ./tsconfig.json -t stylish",
|
||||
"start": "ts-node src/index.ts",
|
||||
"daily": "git pull && npm ci && ts-node src/index.ts 2>&1 | tee -a log_`date --iso-8601`.txt"
|
||||
"start": "ts-node src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node-fetch": "^2.6.2",
|
||||
|
|
|
@ -10,7 +10,7 @@ export class Main {
|
|||
|
||||
private readonly _config: Config;
|
||||
|
||||
constructor(config: string | Config, dryrun = false) {
|
||||
constructor(config: string | Config, accessToken: string, dryrun = false) {
|
||||
if (config === undefined) {
|
||||
console.log("Needs an argument: path of config file")
|
||||
throw "No path given"
|
||||
|
@ -103,4 +103,4 @@ export class Main {
|
|||
}
|
||||
|
||||
|
||||
new Main(process.argv[2], process.argv[3] !== undefined).main().then(_ => console.log("All done"))
|
||||
new Main(process.argv[2], process.argv[3], process.argv[4] !== undefined).main().then(_ => console.log("All done"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue