mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
Compare commits
4 Commits
3adf5173e3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| da5a859d0f | |||
| e33ef53329 | |||
| de2e3cc0a5 | |||
| 2197c23062 |
23
.github/workflows/cloudflare.yml
vendored
23
.github/workflows/cloudflare.yml
vendored
@@ -59,13 +59,19 @@ jobs:
|
||||
echo "env_name=Preview" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Run Cloudflare Wrangler
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: ${{ steps.target.outputs.wrangler_command }}
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run Cloudflare Wrangler & Capture URL
|
||||
id: wrangler
|
||||
run: |
|
||||
# Exécuter wrangler et rediriger la sortie vers un fichier tout en l'affichant (tee)
|
||||
bunx wrangler ${{ steps.target.outputs.wrangler_command }} | tee wrangler.log
|
||||
|
||||
# Extraction de l'URL
|
||||
if [ "${{ steps.target.outputs.env_name }}" = "Preview" ]; then
|
||||
PREVIEW_URL=$(grep -o 'https://[^ ]*\.workers\.dev' wrangler.log | head -n 1)
|
||||
echo "DEPLOY_URL=$PREVIEW_URL" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "DEPLOY_URL=https://arthurdanjou.fr" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
@@ -80,7 +86,8 @@ jobs:
|
||||
title: "Déploiement Portfolio (${{ steps.target.outputs.env_name }})"
|
||||
description: |
|
||||
Build terminé sur la branche **${{ github.ref_name }}**.
|
||||
Environnement cible : **${{ steps.target.outputs.env_name }}**.
|
||||
Environnement : **${{ steps.target.outputs.env_name }}**
|
||||
URL : **${{ steps.wrangler.outputs.DEPLOY_URL }}**
|
||||
Commit: `${{ github.sha }}` par ${{ github.actor }}.
|
||||
nofail: false
|
||||
nodetail: false
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,8 +16,6 @@ logs
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Arthur Danjou
|
||||
Copyright (c) 2026 Arthur Danjou
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -57,13 +57,6 @@
|
||||
},
|
||||
"env": {
|
||||
"preview": {
|
||||
"routes": [
|
||||
{
|
||||
"pattern": "preview.arthurdanjou.fr",
|
||||
"zone_name": "arthurdanjou.fr",
|
||||
"custom_domain": true
|
||||
}
|
||||
],
|
||||
"d1_databases": [
|
||||
{
|
||||
"binding": "DB",
|
||||
|
||||
Reference in New Issue
Block a user