Skip to content

Commit

Permalink
Copy static site and fix absolute links to *.php
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyfok committed Dec 22, 2023
1 parent 9fb5eee commit 5f99e20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy-preview-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
- name: Mirror website to get static pages
run: httrack http://localhost:8080/index{,-en,-fr}.php -%k -%v2 -%F "" -A0 -I0 -s0

- name: Fix up absolute PHP links
- name: Copy static site and fix absolute links to *.php
run: |
cp -a localhost:8080 public
cd public
sed -i 's#"/\([^"]\+\)\.php#"\1.html#g' *.html
sed -i 's#"/\([^"]\+\)\.php#"../\1.html#g' */*.html
Expand All @@ -63,7 +65,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./localhost_8080
path: ./public

# Deployment job
deploy:
Expand Down

0 comments on commit 5f99e20

Please sign in to comment.