Skip to content

Commit 4e7f02f

Browse files
committed
Add workflow for deploying to GH pages
1 parent bdbfd43 commit 4e7f02f

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/pages.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 📄 GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
# Logic based on examples in:
13+
# - https://github.com/actions/upload-pages-artifact
14+
# - https://github.com/actions/deploy-pages
15+
16+
jobs:
17+
build:
18+
if: github.repository == 'remix-run/remix-v2-website'
19+
name: 🏗 Build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: ⬇️ Checkout repo
23+
uses: actions/checkout@v4
24+
25+
- name: ⎔ Setup node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
30+
- name: 📥 Install deps
31+
run: npm ci
32+
33+
- name: 🏗 Build
34+
run: npm run build
35+
36+
- name: ⬆️ Upload static files as artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: build/client/
40+
41+
deploy:
42+
name: 🚀 Deploy
43+
needs: build
44+
permissions:
45+
pages: write # to deploy to Pages
46+
id-token: write # to verify the deployment originates from an appropriate source
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: 🚀 Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)