Skip to content

Commit 8b59113

Browse files
committed
Try the version of the script in vite's documentation.
1 parent aff4bc4 commit 8b59113

File tree

2 files changed

+32
-72
lines changed

2 files changed

+32
-72
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 29 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,51 @@
1-
name: Deploy to GitHub Pages
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
23

34
on:
4-
# Run on pushes to the default branch
5+
# Runs on pushes targeting the default branch
56
push:
6-
branches:
7-
- main
7+
branches: ["main"]
88

9-
# ... Also run manually
9+
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
1111

12-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
13-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
12+
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
1419
concurrency:
1520
group: "pages"
16-
cancel-in-progress: false
17-
18-
# Default to bash
19-
defaults:
20-
run:
21-
shell: bash
21+
cancel-in-progress: true
2222

2323
jobs:
24-
# Build job
25-
build:
26-
runs-on: ubuntu-22.04
27-
timeout-minutes: 10
28-
permissions:
29-
contents: write
30-
pull-requests: read
31-
env:
32-
INPUT_PATH: "dist/"
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
3330
steps:
3431
- name: Checkout
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
36-
37-
- name: Set up Node.js
38-
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
32+
uses: actions/checkout@v4
33+
- name: Set up Node
34+
uses: actions/setup-node@v4
3935
with:
4036
node-version: "22.12.x"
41-
37+
cache: "yarn"
4238
- name: Install dependencies
4339
run: yarn
44-
4540
- name: Build
4641
run: yarn build
47-
48-
- name: Fix permissions
49-
run: |
50-
chmod -c -R +rX "$INPUT_PATH" | while read line; do
51-
echo "::warning title=Invalid file permissions automatically fixed::$line"
52-
done
53-
54-
- name: Archive artifact
55-
shell: sh
56-
run: |
57-
echo ::group::Archive artifact
58-
tar \
59-
--dereference --hard-dereference \
60-
--directory "$INPUT_PATH" \
61-
-cvf "$RUNNER_TEMP/artifact.tar" \
62-
--exclude=.git \
63-
--exclude=.github \
64-
--exclude=*/node_modules/* \
65-
--exclude=node_modules/* \
66-
$(test -f ../.releaseignore && echo "--exclude-from=../.releaseignore") \
67-
.
68-
echo ::endgroup::
69-
env:
70-
INPUT_PATH: ${{ env.INPUT_PATH }}
71-
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
7244
- name: Upload artifact
73-
id: upload-artifact
74-
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
45+
uses: actions/upload-pages-artifact@v3
7546
with:
76-
name: github-pages
77-
path: ${{ runner.temp }}/artifact.tar
78-
retention-days: 1
79-
if-no-files-found: error
80-
81-
deploy:
82-
needs: build
83-
runs-on: ubuntu-22.04
84-
timeout-minutes: 10
85-
permissions:
86-
pages: write # to deploy to Pages
87-
id-token: write # to verify the deployment originates from an appropriate source
88-
environment:
89-
name: github-pages
90-
url: ${{ steps.deployment.outputs.page_url }}
91-
steps:
47+
# Upload dist folder
48+
path: "./dist"
9249
- name: Deploy to GitHub Pages
9350
id: deployment
94-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
51+
uses: actions/deploy-pages@v4

vite.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
base: "/qaboom/",
3+
};

0 commit comments

Comments
 (0)