diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d97598e..5e50e8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: build-site: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Install GraphicsMagick run: sudo apt install graphicsmagick @@ -18,13 +18,13 @@ jobs: sudo apt install ./google-chrome-stable_current_amd64.deb - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '14' cache: 'npm' - name: Restore node_modules cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} @@ -32,7 +32,7 @@ jobs: ${{ runner.os }}-node_modules - name: Restore Asset Cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: key: if-cache path: | @@ -49,6 +49,11 @@ jobs: - name: Build site run: npm run build + - name: Spawn HTTP server + uses: Eun/http-server-action@v1 + with: + directory: dist + - name: (EN) Generate PDF from HTML run: | google-chrome --headless --print-to-pdf-no-header \ @@ -101,7 +106,7 @@ jobs: run: ls -la ${{ github.workspace }}/dist - name: Upload PDFs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: site-pdfs path: | diff --git a/build/engines.js b/build/engines.js index 7f624af..422d2e8 100644 --- a/build/engines.js +++ b/build/engines.js @@ -38,6 +38,7 @@ const markdownEngines = { typographer: true, }) .enable('image') + .use(require('markdown-it-footnote')) .use(require('markdown-it-link-attributes'), { pattern: /^https?:/, attrs: { diff --git a/build/page-tweets.js b/build/page-tweets.js index c8e832a..a8aa923 100644 --- a/build/page-tweets.js +++ b/build/page-tweets.js @@ -1,4 +1,4 @@ -const { chunk, uniq, uniqBy, difference } = require('lodash'); +const { uniq, uniqBy, difference } = require('lodash'); const fs = require('fs-extra'); const { resolve } = require('./resolve'); const log = require('fancy-log'); @@ -32,6 +32,7 @@ function applyI18N (original_tweet, twitter_i18n) { } module.exports = exports = async function tweets (pages) { + // eslint-disable-next-line no-unused-vars const [ twitter, twitterBackup, twitterCache ] = await Promise.all([ fs.readJson(resolve('twitter-config.json')).catch(() => null) .then(getTwitterClient), diff --git a/build/twitter-client.js b/build/twitter-client.js index 5499ea2..309fad8 100644 --- a/build/twitter-client.js +++ b/build/twitter-client.js @@ -1,6 +1,6 @@ const fs = require('fs-extra'); const { resolve } = require('./resolve'); -const { chunk, uniq, difference } = require('lodash'); +const { uniq, difference } = require('lodash'); const Twitter = require('twitter-lite'); const log = require('fancy-log'); const tweetparse = require('./lib/tweetparse'); diff --git a/gulp/cloudfront.js b/gulp/cloudfront.js index 9bb53f9..34741e9 100644 --- a/gulp/cloudfront.js +++ b/gulp/cloudfront.js @@ -4,7 +4,7 @@ var Promise = require('bluebird'); var credentials; try { - credentials = require('../aws.json'); + credentials = require('../aws.json'); // eslint-disable-line import/no-unresolved } catch (e) { credentials = null; } diff --git a/gulp/publish.js b/gulp/publish.js index 328d723..e7d09a2 100644 --- a/gulp/publish.js +++ b/gulp/publish.js @@ -5,7 +5,7 @@ const parallelize = require('concurrent-transform'); var credentials; try { - credentials = require('../aws.json'); + credentials = require('../aws.json'); // eslint-disable-line import/no-unresolved } catch (e) { credentials = null; }