parent
29502fb247
commit
0f9b3999b3
@ -1,36 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
WEBMENTION_TOKEN: ${{secrets.WEBMENTION_TOKEN}}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
|
||||
- uses: actions/cache@v2
|
||||
id: yarn-cache
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: yarn jamstack build
|
||||
run: |
|
||||
yarn install
|
||||
yarn run jamstack
|
||||
|
||||
- name: commit generated hugo stuff
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: jamstack update metadata
|
@ -0,0 +1,20 @@
|
||||
|
||||
const { webmention } = require('jam-my-stack');
|
||||
|
||||
if(!process.env.WEBMENTION_TOKEN) {
|
||||
throw "No webmention token set!"
|
||||
}
|
||||
|
||||
const wmconfig = {
|
||||
endpoint: 'https://jam.brainbaking.com',
|
||||
token: process.env.WEBMENTION_TOKEN
|
||||
};
|
||||
|
||||
(async function() {
|
||||
// 1. send webmentions
|
||||
console.log("1. Sending webmentions...")
|
||||
const since = await webmention.send("redzuurdesem.be", wmconfig)
|
||||
console.log(` -- done`)
|
||||
|
||||
console.log("-- all done!")
|
||||
})()
|
Loading…
Reference in new issue