diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ffa0c8fc..453e8186 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,20 +4,13 @@ on: workflow_dispatch jobs: deploy: - runs-on: ubuntu-latest + runs-on: antville environment: name: p3k.org url: https://blog.p3k.org steps: - - name: Set up SSH agent - uses: antville/helma/.github/actions/ssh@helma-🐜 - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - name: Copy files to production server run: ssh staging-server deploy-antville diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 00000000..8d6a286a --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,40 @@ +name: Run Renovate + +on: workflow_dispatch + +#on: +# schedule: +# - cron: "42 * * * *" + +jobs: + renovate: + runs-on: antville + + steps: + - name: Run Renovate + run: npx renovate + env: + # Renovate is using this token to retrieve release notes + GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} + # See + LOG_LEVEL: info # debug | info | warn | error | fatal + RENOVATE_AUTODISCOVER: 'true' + RENOVATE_CONFIG_FILE: /home/runner/renovate.json + RENOVATE_ENDPOINT: ${{ github.api_url }} + RENOVATE_GIT_AUTHOR: Renovate Bot + #RENOVATE_GIT_IGNORED_AUTHORS: + # - 29139614+renovate[bot]@users.noreply.github.com + RENOVATE_IGNORE_PR_AUTHOR: 'true' + RENOVATE_LOG_FILE: renovate-log.ndjson + RENOVATE_LOG_FILE_LEVEL: debug + RENOVATE_PLATFORM: gitea + RENOVATE_REPOSITORY_CACHE: 'enabled' + # github.token is not working here, it lacks some permissions required by Renovate + RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} + + - name: Save log file + uses: actions/upload-artifact@v3 + with: + name: renovate-log.ndjson + path: renovate-log.ndjson + diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index cb280da3..c53cc5e1 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -4,25 +4,15 @@ on: workflow_dispatch jobs: stage: - runs-on: ubuntu-latest + runs-on: antville environment: name: stage - url: https://antville-test.click + url: ${{ vars.stage_url }} steps: - uses: actions/checkout@v4 - - name: Set up SSH agent - uses: antville/helma/.github/actions/ssh@helma-🐜 - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v3 - - name: Build with Gradle run: ./gradlew :build diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f669afa6..d57ce590 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,21 +1,21 @@ name: Mark stale issues and pull requests -on: +on: schedule: - cron: "30 1 * * *" jobs: stale: - runs-on: ubuntu-latest + runs-on: antville permissions: issues: write pull-requests: write steps: - - uses: actions/stale@v9 + - uses: https://github.com/actions/stale@v9 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ github.token }} stale-issue-message: 'Stale issue message' stale-pr-message: 'Stale pull request message' stale-issue-label: 'no-issue-activity' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..d4efdf9d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,50 @@ +name: Test + +on: workflow_dispatch + +jobs: + test: + runs-on: debian + + environment: + name: p3k.org + url: https://blog.p3k.org + + steps: + - name: Do something + run: | + whoami + pwd + ls -ahl ~ + echo $SHELL + + - name: Ping staging server + run: ssh staging-server ping + + - uses: actions/checkout@v4 + + - name: Run Renovate + run: npx renovate + env: + # TODO: + #GITHUB_COM_TOKEN= + # See + LOG_LEVEL: debug # debug | info | warn | error | fatal + #RENOVATE_CONFIG_FILE: ./.gitlab/renovate.json + RENOVATE_ENDPOINT: ${{ github.api_url }} + RENOVATE_GIT_AUTHOR: Renovate Bot + RENOVATE_LOG_FILE: renovate-log.ndjson + RENOVATE_LOG_FILE_LEVEL: debug + RENOVATE_PLATFORM: gitea + #RENOVATE_REPOSITORIES: $CI_PROJECT_PATH + RENOVATE_AUTODISCOVER: 'true' + RENOVATE_REPOSITORY_CACHE: 'enabled' + RENOVATE_TOKEN: ${{ vars.renovate_token }} #${{ github.token }} + + - uses: actions/upload-artifact@v3 + with: + name: Renovate log + path: renovate-log.ndjson + + #- name: Build with Gradle + # run: ./gradlew :build diff --git a/build.gradle b/build.gradle index 68aa6095..fec4a2d3 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ dependencies { implementation 'org.commonmark:commonmark-ext-autolink:0.21.0' implementation 'org.commonmark:commonmark-ext-gfm-strikethrough:0.21.0' implementation 'org.commonmark:commonmark-ext-gfm-tables:0.21.0' - implementation 'org.jsoup:jsoup:1.17.2' + implementation 'org.jsoup:jsoup:1.18.1' implementation 'rome:rome:1.0' implementation('org.lesscss:lesscss:1.7.0.1.1') { @@ -62,15 +62,17 @@ assemble { dependsOn 'installJars' dependsOn 'buildStaticFiles' - copy { - from fileTree(antvilleBuildDir).matching { - exclude 'node_modules' - exclude 'package.json' - exclude 'tests' - exclude 'tools/client' - exclude 'tools/antclick' - exclude 'package-lock.json' - } into antvilleInstallDir + doFirst { + copy { + from fileTree(antvilleBuildDir).matching { + exclude 'node_modules' + exclude 'package.json' + exclude 'tests' + exclude 'tools/client' + exclude 'tools/antclick' + exclude 'package-lock.json' + } into antvilleInstallDir + } } } diff --git a/code/Global/Global.js b/code/Global/Global.js index a4a60a4d..36de4728 100644 --- a/code/Global/Global.js +++ b/code/Global/Global.js @@ -682,7 +682,8 @@ function list_macro(param, id, limit) { return; } - var skin, collection; + var skin; + var collection = []; var max = Math.min(limit || 25, 100); if (id === 'sites') { diff --git a/code/Site/$Site.skin b/code/Site/$Site.skin index e4866503..a5098f36 100644 --- a/code/Site/$Site.skin +++ b/code/Site/$Site.skin @@ -402,7 +402,7 @@ void (function(url) { // FIXME: compatibility -@base-font: <% value 'base font' default='Helvetica Neue, Helvetica, Arial, sans-serif' %>; +@base-font: <% value 'base font' default='Helvetica Neue, Liberation Sans, Helvetica, Arial, sans-serif' %>; @base-font-size: <% value 'base font size' default="14px e('/') 20px" %>; @base-font-color: <% value 'base font color' default=#444 %>; @@ -435,7 +435,7 @@ void (function(url) { html, html.uk-notouch, body { background-color: @background; color: @text-color; - font-family: @text-font; + font: @text-font; } body.av-16, body.av-page { @@ -560,7 +560,7 @@ hr { } &.uk-button-link { - border: initial; + border-color: transparent; &:link, &:visited { color: @link-color; diff --git a/code/Site/Site.skin b/code/Site/Site.skin index 2b8cd2f6..df62739a 100644 --- a/code/Site/Site.skin +++ b/code/Site/Site.skin @@ -115,7 +115,7 @@ function openPopup(img, width, height) { <% value 'muted color' #999999 %> <% value 'hover color' #d50000 %> <% value 'link color' #ff4040 %> -<% value 'text font' 'Helvetica, Arial, sans-serif' %> -<% value 'title font' 'Helvetica, Arial, sans-serif' %> +<% value 'text font' 'Liberation Sans, Helvetica, Arial, sans-serif' %> +<% value 'title font' 'Liberation Sans, Helvetica, Arial, sans-serif' %> <% #stylesheet %>