Skip to content

Commit 05856bc

Browse files
committed
Add a GitHub workflow to deploy the site
Technically, we could use the default strategy, which does not require any confiuration. However, the default strategy has 3 jobs, downloads a hefty Docker container containing Jekyll and whatnot, and takes over half a minute to deploy two files (okay, three, but the node.js script is not needed). Let's instead adapt the simple and fast GitHub starter workflow from https://github.com/actions/starter-workflows/blob/main/pages/static.yml Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 526ef65 commit 05856bc

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [gh-pages]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: '.'
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)