Skip to content

Commit 42ea8a3

Browse files
authored
Create pages.yml
Signed-off-by: Jorge O. Castro <[email protected]>
1 parent 2df6bf8 commit 42ea8a3

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
merge_group:
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
name: Build Docusaurus
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19+
with:
20+
fetch-depth: 0
21+
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2
22+
- name: Install dependencies
23+
run: bun install --frozen-lockfile --production
24+
- name: Build website
25+
run: bun run build
26+
- name: Upload Build Artifact
27+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
28+
with:
29+
path: build
30+
31+
deploy:
32+
name: Deploy to GitHub Pages
33+
if: github.ref == 'refs/heads/main'
34+
needs: build
35+
36+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
37+
permissions:
38+
pages: write # to deploy to Pages
39+
id-token: write # to verify the deployment originates from an appropriate source
40+
41+
# Deploy to the github-pages environment
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

0 commit comments

Comments
 (0)