-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.8.0 #457
v2.8.0 #457
Changes from 43 commits
b026b79
bfc3c24
a3b4d42
d0f2be7
57408ad
9f74998
262533c
27b5597
004febb
d3719a8
93737cb
1903177
1e9ab16
9967cde
202bf85
e87dacd
b25d911
918da0e
2d34576
dfb3287
48aa3c0
3f4f079
675d775
68aeb04
485dec9
4df8a07
5455c10
fb31d33
81403f9
72a8c26
09ff338
10c6a46
4d3fb82
1e1b4ed
6d0546e
64f8cc1
986f2ac
0056903
a66108c
bc8bd89
824397c
28c161b
0847f0e
f75ff0c
eb10488
3db0348
e22b67c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||||||||||||||||||||||||
name: Build JS and CSS | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||
- main | ||||||||||||||||||||||||||
- dev | ||||||||||||||||||||||||||
paths: | ||||||||||||||||||||||||||
- 'source/js/**' | ||||||||||||||||||||||||||
- 'source/css/**' | ||||||||||||||||||||||||||
- 'source/build/**' | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||
build: | ||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||
- name: Checkout Repository | ||||||||||||||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||
persist-credentials: false # Prevent using GITHUB_TOKEN automatically | ||||||||||||||||||||||||||
fetch-depth: 0 # Fetch all history for accurate file diffs | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Set up Node.js | ||||||||||||||||||||||||||
uses: actions/setup-node@v4 | ||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||
node-version: '20.x' # Specify your Node.js version | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Install Dependencies | ||||||||||||||||||||||||||
run: npm install | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Build Project | ||||||||||||||||||||||||||
run: npm run build | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Comment on lines
+29
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Optimize build performance with caching Consider adding npm cache and artifact persistence to improve workflow efficiency. + - name: Cache dependencies
+ uses: actions/cache@v3
+ with:
+ path: ~/.npm
+ key: npm-${{ hashFiles('package-lock.json') }}
+ restore-keys: npm-
+
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v3
+ with:
+ name: build-files
+ path: |
+ source/build/js
+ source/build/css
|
||||||||||||||||||||||||||
- name: Configure Git | ||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||
git config user.name "github-actions" | ||||||||||||||||||||||||||
git config user.email "github-actions@github.com" | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
- name: Commit and Push Changes | ||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||
git add source/build/js source/build/css | ||||||||||||||||||||||||||
# Check if there are any changes | ||||||||||||||||||||||||||
if ! git diff --cached --quiet; then | ||||||||||||||||||||||||||
git commit -m "ci: build and update source/build/js and source/build/css [skip ci]" | ||||||||||||||||||||||||||
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/} | ||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||
Comment on lines
+44
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix security and shell script issues The git push command exposes the token in the command line and has potential shell escaping issues. - git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/}
+ git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF#refs/heads/}" 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
echo "No changes to commit" | ||||||||||||||||||||||||||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ jobs: | |
|
||
- run: npm ci | ||
|
||
- run: npm run build:css | ||
- run: npm run build | ||
|
||
- run: npm publish | ||
env: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm run build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# ---------------------------------------- | ||
# Traduction du site | ||
# ---------------------------------------- | ||
search: recherche... | ||
toc: Sur cette page | ||
prev: Précédent | ||
next: Suivant | ||
prev_posts: Articles précédents | ||
next_posts: Articles suivants | ||
page: Page %d | ||
recent_posts: Articles récents | ||
share: Partager | ||
powered_by: "POWERED BY %s" | ||
theme: THEME | ||
rss_feed: Flux RSS | ||
category: Catégorie | ||
categories: Catégories | ||
tag: Tag | ||
tags: Tags | ||
post: Post | ||
posts: Posts | ||
tagcloud: Nuage de tags | ||
comment: Commentaire | ||
comments: Commentaires | ||
home: Accueil | ||
archive: Archive | ||
archives: Archives | ||
top: TOP | ||
sticky: Sticky | ||
go-back-home: Retour à l'accueil | ||
|
||
# ---------------------------------------- | ||
# Traduction du menu | ||
# ---------------------------------------- | ||
about: À propos | ||
changelog: Journal des modifications | ||
links: Liens | ||
link: Lien | ||
friends: Amis | ||
friend: Ami | ||
timeline: Chronologie | ||
shuoshuo: Shuoshuo | ||
|
||
# ---------------------------------------- | ||
# Nombre de sites Web | ||
# ---------------------------------------- | ||
site_uv: VISITEURS | ||
site_pv: NOMBRE TOTAL DE PAGES VUES | ||
read_more: Lire la suite | ||
wordcount: Mots | ||
min2read: Min | ||
status: Status | ||
|
||
# ---------------------------------------- | ||
# Pied de page | ||
# ---------------------------------------- | ||
runtime: Blog en ligne depuis | ||
days: Jours | ||
hours: Hrs | ||
minutes: Min | ||
seconds: Sec | ||
optimized_by: et Propulsé par Evan | ||
rights: Tous droits réservés | ||
site_posts: "%s posts au total" | ||
site_wordcount: "%s mots au total" | ||
|
||
# ---------------------------------------- | ||
# Post | ||
# ---------------------------------------- | ||
copyright: | ||
author: Auteur | ||
title: Titre | ||
link: Lien | ||
create_time: Créé à | ||
update_time: Mis à jour à | ||
license_title: Licence | ||
license_content: "Cette œuvre est sous licence %s." | ||
all_rights_reserved: "Tous droits réservés à © %s" | ||
public_domain: "Cette œuvre est dans le domaine public." | ||
|
||
ago: | ||
second: "Il y a %s secondes" | ||
minute: "Il y a %s minutes" | ||
hour: "Il y a %s heures" | ||
day: "Il y a %s jours" | ||
week: "Il y a %s semaines" | ||
month: "Il y a %s mois" | ||
year: "Il y a %s années" | ||
|
||
create_time: Créé | ||
update_time: Mis à jour | ||
expired: "Ce message a été écrit il y a %s jours et son contenu peut être obsolète." |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add explicit permissions configuration
The workflow needs write permissions to push changes to the repository.
📝 Committable suggestion