Skip to content

Commit

Permalink
Merge branch 'master' into publisher-go
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/ci.yml
#	publisher/Dockerfile
#	publisher/Makefile
#	publisher/invoke.yaml
#	publisher/requirements.txt
#	publisher/scripts/make_new_episode.sh
#	publisher/scripts/upload_mp3.sh
#	publisher/spot.yml
#	publisher/tasks/mp3_tags.py
#	publisher/utils/episode_posts.py
  • Loading branch information
umputun committed Jan 1, 2024
2 parents 6ab1291 + f2b2f83 commit 3f05b9a
Show file tree
Hide file tree
Showing 2,453 changed files with 18,269 additions and 7,296 deletions.
Binary file removed .DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions .github/workflows/ci-frontend-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Check size limit for CSS and JS bundles"
on:
pull_request:
paths:
- "hugo/**/*.jsx?"
- "hugo/**/*.tsx?"
- "hugo/**/*.scss"

jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: hugo/
build_script: build
39 changes: 39 additions & 0 deletions .github/workflows/ci-frontend-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Lint JS files"

on:
push:
branches:
tags:
paths:
- "hugo/**/*.jsx?"
- "hugo/**/*.tsx?"
pull_request:
paths:
- "hugo/**/*.jsx?"
- "hugo/**/*.tsx?"

jobs:
frontend-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14.15]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: npm ci --loglevel warn
working-directory: ./hugo

- uses: actions/cache@v2
with:
path: ${{ github.workspace }}/hugo/node_modules/.cache
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm run eslint
working-directory: ./hugo
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ publisher/utils/eyeD3/*.pyc
*.code-workspace
.env
.DS_Store
publisher/target/
publisher/target/
.idea
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM node:10 as build
FROM node:10-alpine as build

RUN mkdir -p /app
WORKDIR /app

ENV NODE_ENV=production
COPY hugo/package.json hugo/package-lock.json ./
RUN npm install --only=production
RUN npm ci

ENV NODE_ENV=production

COPY ./hugo/webpack.mix.js ./hugo/tsconfig.json ./hugo/.babelrc.js /app/
COPY ./hugo/src/ /app/src/
COPY ./hugo/layouts /app/layouts/

COPY hugo/.modernizr.js hugo/webpack.mix.js hugo/tsconfig.json hugo/.babelrc.js ./
COPY hugo/src/ src/
RUN npm run production
RUN npm run build

###
###

FROM alpine:3.8
FROM alpine:3.18

RUN \
apk add --update --no-cache tzdata curl openssl git openssh-client python3 ca-certificates && \
Expand All @@ -26,7 +26,7 @@ RUN \
echo "CDT" > /etc/timezone && date && \
rm -rf /var/cache/apk/*

ENV HUGO_VER=0.55.5
ENV HUGO_VER=0.81.0
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VER}/hugo_${HUGO_VER}_Linux-64bit.tar.gz /tmp/hugo.tar.gz
RUN \
cd /tmp && tar -zxf hugo.tar.gz && ls -la && \
Expand Down
7 changes: 2 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: '2'
version: "2"
services:

hugo:
image: hugo.radio-t
build: .
Expand Down Expand Up @@ -29,7 +28,7 @@ services:
image: radio-t/publisher
build: publisher
hostname: publisher
container_name: publisher
container_name: publisher
restart: always
logging: *default_logging
environment:
Expand All @@ -40,5 +39,3 @@ services:
- /Users/umputun/.ssh/id_rsa.pub:/home/app/.ssh/id_rsa.pub
- /Users/umputun/.ssh/id_rsa:/home/app/.ssh/id_rsa
- /Volumes/Podcasts/radio-t:/episodes


Binary file removed hugo/.DS_Store
Binary file not shown.
8 changes: 1 addition & 7 deletions hugo/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ module.exports = {
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-react-jsx',
// [
// '@babel/plugin-transform-runtime',
// {
// helpers: false,
// },
// ],
['@babel/plugin-transform-react-jsx', { pragma: 'h' }],
],
};
4 changes: 4 additions & 0 deletions hugo/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
public
dev
static/build
55 changes: 55 additions & 0 deletions hugo/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
module.exports = {
env: {
browser: true,
es2021: true,
amd: true,
},
globals: {
process: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'prettier',
'prettier/@typescript-eslint',
'prettier/prettier',
'prettier/react',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'react'],
rules: {
'one-var': ['error', 'never'],
'prefer-template': 'error',
'react/prop-types': 'off',
'no-use-before-define': 'error',
},
settings: {
react: {
pragma: 'h',
fragment: 'Fragment',
version: '17',
},
},
overrides: [
{
files: './*.js',
env: {
node: true,
},
},
{
files: ['*.ts', '*.tsx'],
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
],
};
Loading

0 comments on commit 3f05b9a

Please sign in to comment.