mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-11-25 20:42:40 +00:00
use markdown-it-footnote | fix lint | fix Actions
This commit is contained in:
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@@ -7,7 +7,7 @@ jobs:
|
|||||||
build-site:
|
build-site:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install GraphicsMagick
|
- name: Install GraphicsMagick
|
||||||
run: sudo apt install graphicsmagick
|
run: sudo apt install graphicsmagick
|
||||||
@@ -18,13 +18,13 @@ jobs:
|
|||||||
sudo apt install ./google-chrome-stable_current_amd64.deb
|
sudo apt install ./google-chrome-stable_current_amd64.deb
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Restore node_modules cache
|
- name: Restore node_modules cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
${{ runner.os }}-node_modules
|
${{ runner.os }}-node_modules
|
||||||
|
|
||||||
- name: Restore Asset Cache
|
- name: Restore Asset Cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
key: if-cache
|
key: if-cache
|
||||||
path: |
|
path: |
|
||||||
@@ -49,6 +49,11 @@ jobs:
|
|||||||
- name: Build site
|
- name: Build site
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Spawn HTTP server
|
||||||
|
uses: Eun/http-server-action@v1
|
||||||
|
with:
|
||||||
|
directory: dist
|
||||||
|
|
||||||
- name: (EN) Generate PDF from HTML
|
- name: (EN) Generate PDF from HTML
|
||||||
run: |
|
run: |
|
||||||
google-chrome --headless --print-to-pdf-no-header \
|
google-chrome --headless --print-to-pdf-no-header \
|
||||||
@@ -101,7 +106,7 @@ jobs:
|
|||||||
run: ls -la ${{ github.workspace }}/dist
|
run: ls -la ${{ github.workspace }}/dist
|
||||||
|
|
||||||
- name: Upload PDFs
|
- name: Upload PDFs
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: site-pdfs
|
name: site-pdfs
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const markdownEngines = {
|
|||||||
typographer: true,
|
typographer: true,
|
||||||
})
|
})
|
||||||
.enable('image')
|
.enable('image')
|
||||||
|
.use(require('markdown-it-footnote'))
|
||||||
.use(require('markdown-it-link-attributes'), {
|
.use(require('markdown-it-link-attributes'), {
|
||||||
pattern: /^https?:/,
|
pattern: /^https?:/,
|
||||||
attrs: {
|
attrs: {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { chunk, uniq, uniqBy, difference } = require('lodash');
|
const { uniq, uniqBy, difference } = require('lodash');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { resolve } = require('./resolve');
|
const { resolve } = require('./resolve');
|
||||||
const log = require('fancy-log');
|
const log = require('fancy-log');
|
||||||
@@ -32,6 +32,7 @@ function applyI18N (original_tweet, twitter_i18n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = exports = async function tweets (pages) {
|
module.exports = exports = async function tweets (pages) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
const [ twitter, twitterBackup, twitterCache ] = await Promise.all([
|
const [ twitter, twitterBackup, twitterCache ] = await Promise.all([
|
||||||
fs.readJson(resolve('twitter-config.json')).catch(() => null)
|
fs.readJson(resolve('twitter-config.json')).catch(() => null)
|
||||||
.then(getTwitterClient),
|
.then(getTwitterClient),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { resolve } = require('./resolve');
|
const { resolve } = require('./resolve');
|
||||||
const { chunk, uniq, difference } = require('lodash');
|
const { uniq, difference } = require('lodash');
|
||||||
const Twitter = require('twitter-lite');
|
const Twitter = require('twitter-lite');
|
||||||
const log = require('fancy-log');
|
const log = require('fancy-log');
|
||||||
const tweetparse = require('./lib/tweetparse');
|
const tweetparse = require('./lib/tweetparse');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var Promise = require('bluebird');
|
|||||||
|
|
||||||
var credentials;
|
var credentials;
|
||||||
try {
|
try {
|
||||||
credentials = require('../aws.json');
|
credentials = require('../aws.json'); // eslint-disable-line import/no-unresolved
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
credentials = null;
|
credentials = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const parallelize = require('concurrent-transform');
|
|||||||
|
|
||||||
var credentials;
|
var credentials;
|
||||||
try {
|
try {
|
||||||
credentials = require('../aws.json');
|
credentials = require('../aws.json'); // eslint-disable-line import/no-unresolved
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
credentials = null;
|
credentials = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user