Chore: deploy via forgejo actions (dryrun)
Some checks failed
/ deploy_on_hetzner_single (push) Failing after 11m3s

This commit is contained in:
Pieter Vander Vennet 2025-02-06 22:37:56 +01:00
parent 340f256074
commit bc09f8a719
4 changed files with 38 additions and 4 deletions

View file

@ -0,0 +1,13 @@
{
"cacheDir": "./cache",
"mastodonAuth": {
"url": "https://en.osm.town/",
"timeout": 60000
},
"actions": [
{
"showTopContributors": true,
"showTopThemes": true
}
]
}

View 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

View file

@ -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",

View file

@ -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"))