Skip to content

Commit 1ff4abd

Browse files
authored
Update GitHub Actions workflow for Pages deployment (#377)
1 parent 7ba3745 commit 1ff4abd

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/static.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build and Deploy Pages
2+
on:
3+
push:
4+
branches: [ main ] # or your branch
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
actions: read # required by deploy-pages@v4
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Show disk usage
17+
run: df -h
18+
19+
- name: Free disk space
20+
uses: jlumbroso/[email protected]
21+
with:
22+
tool-cache: true
23+
android: true
24+
dotnet: true
25+
haskell: true
26+
large-packages: true
27+
docker-images: true
28+
swap-storage: true
29+
30+
- uses: actions/checkout@v5
31+
with:
32+
fetch-depth: 1
33+
filter: 'blob:none'
34+
sparse-checkout: |
35+
.
36+
37+
# Example: Jekyll (swap for Hugo/Node/etc.)
38+
- uses: ruby/setup-ruby@v1
39+
with: { ruby-version: '3.3' }
40+
- run: |
41+
gem install bundler jekyll
42+
bundle install --path vendor/bundle
43+
JEKYLL_ENV=production bundle exec jekyll build -d _site
44+
45+
- name: Upload Pages artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: _site
49+
50+
deploy:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)