Skip to content

Commit d0cebff

Browse files
feat: update dependencies and worflows
1 parent 63b49bb commit d0cebff

File tree

246 files changed

+8651
-153750
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+8651
-153750
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'build template'
2+
description: 'build template archive'
3+
# We declare that the action takes two arguments in input
4+
inputs:
5+
project:
6+
description: 'Project'
7+
required: true
8+
tag:
9+
description: 'Tag'
10+
required: true
11+
# And ouput one variable that will be available by the workflow
12+
outputs:
13+
filepath:
14+
description: "template archive path"
15+
value: ${{ steps.build.outputs.filepath }}
16+
runs:
17+
using: "composite"
18+
steps:
19+
# Ensure that zip is installed
20+
- run: sudo apt-get install zip
21+
shell: bash
22+
# Here we pass our inputs to the script.sh
23+
- id: build
24+
run: ${{ github.action_path }}/script.sh ${{inputs.project}} ${{inputs.tag}}
25+
shell: bash
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
DIRECTORY=`dirname $0`
4+
INPUT_PROJECT=$1
5+
INPUT_TAG=$2
6+
7+
if [ -z $INPUT_PROJECT ]
8+
then
9+
echo "<project> missing"
10+
echo "Usage: ${0} <project> <tag>"
11+
exit 1
12+
fi
13+
14+
if [ -z $INPUT_TAG ]
15+
then
16+
echo "<tag> missing"
17+
echo "Usage: ${0} <project> <tag>"
18+
exit 1
19+
fi
20+
21+
# Set archive name from arguments
22+
ARCHIVE=template-${INPUT_PROJECT}-${INPUT_TAG}.zip
23+
24+
echo "::group::building ${ARCHIVE}"
25+
echo "::debug::${ARCHIVE}"
26+
27+
# zip sources template-${PROJECT}-${TAG}.zip
28+
zip -r ${ARCHIVE} . \
29+
-x "dist/*" \
30+
-x "node_modules/*" \
31+
-x ".git/*" \
32+
-x ".github/*" \
33+
-x "docker-compose.yml"
34+
35+
# Here we use echo to ouput the variables, usefull for to debug in github ui
36+
echo "$PWD"
37+
echo "$DIRECTORY"
38+
echo "$GITHUB_WORKSPACE"
39+
40+
ls -lh $ARCHIVE
41+
42+
echo "::endgroup::"
43+
44+
echo "- ${INPUT_PROJECT^} ${INPUT_TAG} template built :rocket:" >> $GITHUB_STEP_SUMMARY
45+
46+
# This step is important, it set the "filepath" output variable
47+
# Will be accessible in workflow
48+
echo "::set-output name=filepath::${ARCHIVE}"

.github/workflows/deploy.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: deploy
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
- 'CHANGELOG.md'
8+
- 'LICENSE.md'
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: ${{ github.workflow }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
docker-build:
18+
# We can skip deployment by adding [skip] in the commit body
19+
if: "!contains(github.event.head_commit.message, '[skip]')"
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up dockertags
25+
run: |
26+
echo "dockertags=digisquad/cssninja.krypton-demo:latest" >> $GITHUB_ENV
27+
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v2
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v2
33+
34+
- name: Login to DockerHub
35+
uses: docker/#-action@v2
36+
with:
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
40+
- name: Build and push
41+
id: docker_build
42+
uses: docker/build-push-action@v3
43+
timeout-minutes: 60
44+
with:
45+
push: true
46+
tags: ${{ env.dockertags }}
47+
cache-from: type=registry,ref=${{ env.dockertags }}
48+
cache-to: type=inline
49+
50+
deploy:
51+
runs-on: ubuntu-latest
52+
needs: [docker-build]
53+
54+
steps:
55+
- uses: actions/checkout@v3
56+
- name: Prepare
57+
uses: appleboy/ssh-action@master
58+
with:
59+
host: ${{ secrets.SSH_HOST }}
60+
username: ${{ secrets.SSH_USER }}
61+
key: ${{ secrets.SSH_PRIVATE_KEY }}
62+
script_stop: true
63+
script: mkdir -p ${{ secrets.HOST_DIRECTORY }}
64+
65+
- name: Publish
66+
uses: appleboy/scp-action@master
67+
with:
68+
host: ${{ secrets.SSH_HOST }}
69+
username: ${{ secrets.SSH_USER }}
70+
key: ${{ secrets.SSH_PRIVATE_KEY }}
71+
source: docker-compose.yml
72+
target: ${{ secrets.HOST_DIRECTORY }}
73+
74+
- name: Deploy
75+
uses: appleboy/ssh-action@master
76+
with:
77+
host: ${{ secrets.SSH_HOST }}
78+
username: ${{ secrets.SSH_USER }}
79+
key: ${{ secrets.SSH_PRIVATE_KEY }}
80+
script_stop: true
81+
script: |
82+
cd ${{ secrets.HOST_DIRECTORY }}
83+
docker-compose pull
84+
docker-compose up -d --force-recreate --remove-orphans

.github/workflows/release.yml

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: release
2+
on:
3+
# Automatically run when a semver tag is pushed
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
release:
10+
# setup strategy matrix, so we can share same pnpm cache
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
node-version: [18]
15+
runs-on: ${{ matrix.os }}
16+
17+
steps:
18+
# Checkout action retreive the source (git clone)
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0 # needed to retreive all git history
22+
23+
# Enable corepack, note that nodejs is already installed
24+
- run: corepack enable
25+
26+
# Setup pnpm with cache
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "pnpm"
31+
32+
# Compute tag and capitalized product name
33+
- id: meta
34+
name: release meta
35+
run: |
36+
project=${GITHUB_REPOSITORY#*/}
37+
echo ::set-output name=project::${project}
38+
echo ::set-output name=project-capitalized::${project^}
39+
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
40+
41+
# This is where we generate releases assets.
42+
# It use a github action in the current directory
43+
# which contains a shell script to create the archive.
44+
# The archive path is stored in the output action
45+
- id: build_template
46+
name: build release template
47+
uses: ./.github/actions/build-template-action
48+
with:
49+
tag: ${{ steps.meta.outputs.tag }}
50+
project: ${{ steps.meta.outputs.project }}
51+
52+
# We re-generate the changelog using a subset of standard-version
53+
# The content is generated in a temp /CHANGELOG_RELEASE.md file
54+
# It is used to generate the body of the github release
55+
- id: changelog
56+
name: release changelog
57+
run: |
58+
pnpm dlx conventional-changelog-cli -p conventionalcommits -r 2 -o ${{ github.workspace }}/CHANGELOG_RELEASE.md
59+
cat ${{ github.workspace }}/CHANGELOG_RELEASE.md
60+
61+
# Prepare the draft github release
62+
- id: create_release
63+
name: create github draft release
64+
uses: softprops/action-gh-release@v1
65+
with:
66+
# Use outputs from meta and changelog
67+
tag_name: ${{ steps.meta.outputs.tag }}
68+
name: ${{ steps.meta.outputs.project-capitalized }} ${{ steps.meta.outputs.tag }}
69+
body_path: ${{ github.workspace }}/CHANGELOG_RELEASE.md
70+
prerelease: false
71+
# The draft is required to allow file upload
72+
draft: true
73+
fail_on_unmatched_files: true
74+
# Here we bind files built by custom actions to the release
75+
files: |
76+
${{ github.workspace }}/${{ steps.build_template.outputs.filepath }}
77+
78+
# Publish the github release
79+
# Dojo listen to those events
80+
- name: publish github draft release
81+
uses: eregon/publish-release@v1
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.APP_GITHUB_TOKEN }}
84+
with:
85+
release_id: ${{ steps.create_release.outputs.id }}
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: standard-version
2+
on:
3+
# Allow to be manually dispatched
4+
workflow_dispatch:
5+
inputs:
6+
options:
7+
description: 'standard-version options'
8+
# Allow to be run via webhooks (Dojo will use this)
9+
repository_dispatch:
10+
types: [standard-version]
11+
12+
jobs:
13+
standard-version:
14+
# setup strategy matrix, so we can share same pnpm cache
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
node-version: [18]
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
# Checkout action retreive the source (git clone)
23+
- uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 0 # needed to retreive all git history
26+
token: ${{ secrets.APP_GITHUB_TOKEN }}
27+
28+
# Enable corepack, note that nodejs is already installed
29+
- run: corepack enable
30+
31+
# Setup pnpm with cache
32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: "pnpm"
36+
37+
# Run "standard-version", which may create a new tag
38+
- run: |
39+
git config user.name digisquad-bot
40+
git config user.email admin@digisquad.io
41+
pnpm dlx standard-version ${{ github.event.inputs.options }}
42+
git push --follow-tags origin main
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.APP_GITHUB_TOKEN }}

.npmrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Disable npm warning about missing optional peer dependencies
2+
strict-peer-dependencies=false
3+
legacy-peer-deps=true
4+
# Force pnpm to install all deep dependencies in node_modules
5+
shamefully-hoist=true

Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM bitnami/node:18 AS build
2+
WORKDIR /app
3+
4+
RUN corepack enable
5+
6+
COPY package.json ./
7+
COPY pnpm-lock.yaml ./
8+
COPY .npmrc ./
9+
RUN pnpm install --frozen-lockfile
10+
11+
COPY . .
12+
RUN pnpm build
13+
14+
15+
FROM bitnami/nginx:1.22 AS prod
16+
WORKDIR /app
17+
18+
COPY --from=build /app/dist .
19+
COPY ./nginx/alpinejs.conf /opt/bitnami/nginx/conf/server_blocks/nginx.conf

LICENSE LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018-2021 cssninjaStudio
3+
Copyright (c) 2018-2023 cssninjaStudio
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+19-23
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,49 @@
88

99
## ✌️ preview
1010

11-
Check out the live demo by clicking [here](https://cssninjastudio.github.io/krypton/).
12-
Krypton is built with [Bulma](https://bulma.io) and [Alpine JS](https://github.com/alpinejs/alpine).
11+
Check out the live demo by clicking [here](https://krypton.cssninja.io).
12+
Fresh is built with [Bulma](https://bulma.io) and [Alpine JS](https://github.com/alpinejs/alpine).
1313

1414
## 👍 Features
1515

16-
- Gulp 4 and nodejs 12.20.0 to 16.0.0
17-
- Bulma 0.9.3
18-
- ES6 support
19-
- Alpine v3
16+
* Gulp 4 and node 16 (minimum)
17+
* Bulma 0.9.x
18+
* ES6 support
19+
* Alpine v3.x
2020

2121
## 👌 Usage
2222

23-
1. Install Dev Depedencies
23+
1. Install Depedencies
2424

2525
```sh
26-
yarn install
26+
pnpm i
2727
```
2828

29-
2. To start development server
29+
2. Run in dev mode
3030

3131
```sh
32-
yarn dev
32+
pnpm dev
3333
```
3434

35-
3. Build for production
35+
3. Or build source
3636

3737
```sh
38-
# build the dist folder
39-
yarn build
38+
pnpm build
4039
```
4140

4241
## 🍔 Issues
4342

44-
If you've found an issue or a bug, you can report it in the issues section of this repository.
45-
Please try to follow these simple guidelines to report your issue:
43+
If you've found an issue or a bug, you can report it in the issues section of this repository. Please try to follow these simple guidelines to report your issue:
4644

47-
- Issue definition
48-
- Expected behaviour
49-
- Actual behaviour
50-
- steps to reproduce
51-
- Already tried fixes (if relevant)
45+
* Issue definition
46+
* Expected behaviour
47+
* Actual behaviour
48+
* steps to reproduce
49+
* Already tried fixes (if relevant)
5250

5351
## 🎉 More
5452

55-
You liked Krypton? Check also our other premium Envato bulma themes [Css Ninja](https://cssninja.io/themes).
56-
57-
Find more premium bulma templates on [Css Ninja](https://cssninja.io/category/all).
53+
Find more premium website and app templates on [Css Ninja](https://cssninja.io/).
5854

5955
## 🚀 About Us
6056

0 commit comments

Comments
 (0)