Skip to content

Commit 49a0b54

Browse files
committed
Build and deploy Pages with actions, allowing you to preview them in artifacts
1 parent 9046a0e commit 49a0b54

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and deploy GitHub Pages
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-24.04
9+
steps:
10+
11+
- name: Checkout
12+
uses: actions/checkout@v6
13+
14+
- name: Setup Pages
15+
uses: actions/configure-pages@v5
16+
17+
- name: Build
18+
uses: actions/jekyll-build-pages@v1
19+
20+
- name: Upload artifact
21+
uses: actions/upload-pages-artifact@v4
22+
with:
23+
retention-days: 7
24+
25+
deploy:
26+
27+
needs: build
28+
29+
runs-on: ubuntu-24.04
30+
31+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
32+
permissions:
33+
pages: write # to deploy to Pages
34+
id-token: write # to verify the deployment originates from an appropriate source
35+
36+
# Deploy to the github-pages environment
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
41+
if: github.ref == 'refs/heads/master'
42+
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)