Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f7e1a0130a |
45
.github/workflows/deploy.yml
vendored
Normal file
45
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: Deploy Static PHP Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Step 1: Checkout the repository
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Step 2: Set up PHP (optional if your site needs specific PHP extensions)
|
||||||
|
- name: Set up PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.1' # Use the PHP version your site requires
|
||||||
|
|
||||||
|
# Step 3: Start a PHP server
|
||||||
|
- name: Start PHP server
|
||||||
|
run: php -S localhost:8000 > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
# Step 4: Wait for the server to start
|
||||||
|
- name: Wait for server
|
||||||
|
run: sleep 5
|
||||||
|
|
||||||
|
# Step 5: Use wget to generate static files
|
||||||
|
- name: Generate static files
|
||||||
|
run: |
|
||||||
|
mkdir static_site
|
||||||
|
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --reject-regex '/article.*|.*@.*\..*' --no-host-directories http://localhost:8000 -P static_site
|
||||||
|
|
||||||
|
# Step 6: Deploy to GitHub Pages
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v4
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./static_site
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
TITLE:A technical article
|
|
||||||
DATE:2015 April 9th
|
|
||||||
AUTHOR:Jo
|
|
||||||
|
|
||||||
This Python code is really good:
|
|
||||||
|
|
||||||
def good():
|
|
||||||
a = 1
|
|
||||||
b = 2
|
|
||||||
c = a + b
|
|
||||||
return None
|
|
||||||
|
|
||||||
This one is *even better:*
|
|
||||||
|
|
||||||
def better():
|
|
||||||
a = 128
|
|
||||||
b = 256
|
|
||||||
c = a * b
|
|
||||||
return None
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
TITLE:A new article
|
|
||||||
DATE:2015 April 10th
|
|
||||||
URL:coolarticle
|
|
||||||
AUTHOR:Jo
|
|
||||||
|
|
||||||
This is a sample blog article. What to do now?
|
|
||||||
* write a new article,
|
|
||||||
* listen to [some music](http://soundcloud.com/shura/sets/shura-just-once),
|
|
||||||
* or do something else?
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ if ($requestedpage === $blogpagename)
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="left"><a href="">© <?php echo date('Y') . " " . $sitename; ?></a></div>
|
<div class="left"><a href="/">© <?php echo date('Y') . " " . $sitename; ?></a></div>
|
||||||
<div class="right">Powered by <a href="https://github.com/josephernest/void">Void</a>.</div>
|
<div class="right">Powered by <a href="https://github.com/josephernest/void">Void</a>.</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/assets/theme-toggle.js"></script>
|
<script src="/assets/theme-toggle.js"></script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
TITLE:Accueil
|
TITLE:Accueil
|
||||||
NOMENU:1
|
<!-- NOMENU:1 -->
|
||||||
|
|
||||||

|

|
||||||
![Photo de l'équipe ?]()
|
![Photo de l'équipe ?]()
|
||||||
Reference in New Issue
Block a user