Skip to content

Commit 002ac22

Browse files
committed
chore: 404 github pages redirect
1 parent 105f33e commit 002ac22

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/gh-pages-deploy.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ concurrency:
1818

1919
jobs:
2020
Github-Pages-Release:
21-
2221
timeout-minutes: 10
2322

2423
environment:
@@ -42,9 +41,8 @@ jobs:
4241
- name: lint
4342
run: cargo clippy & cargo fmt
4443

45-
4644
- name: Download and install tailwindcss binary
47-
run: npm install -D tailwindcss daisyui && npx @tailwindcss/cli -i "./style/input.css" -o "./style/output.css" # run tailwind
45+
run: npm install -D tailwindcss daisyui && npx @tailwindcss/cli -i "./style/input.css" -o "./style/output.css" # run tailwind
4846

4947
- name: Download and install Trunk binary
5048
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.21.12/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
@@ -55,16 +53,16 @@ jobs:
5553
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
5654
# relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
5755
# will obviously return error 404 not found.
58-
run: ./trunk build --release --public-url "/blog/"
59-
56+
run: |
57+
./trunk build --release --public-url "/blog/"
58+
cp ./dist/index.html ./dist/404.html
6059
6160
# Deploy to gh-pages branch
6261
# - name: Deploy 🚀
6362
# uses: JamesIves/github-pages-deploy-action@v4
6463
# with:
6564
# folder: dist
6665

67-
6866
# Deploy with Github Static Pages
6967

7068
- name: Setup Pages
@@ -77,7 +75,7 @@ jobs:
7775
uses: actions/upload-pages-artifact@v3
7876
with:
7977
# Upload dist dir
80-
path: './dist'
78+
path: "./dist"
8179

8280
- name: Deploy to GitHub Pages 🚀
8381
id: deployment

0 commit comments

Comments
 (0)