Skip to content

Commit 85e0462

Browse files
authored
ci: deploy website with github actions (#1767)
1 parent 2067442 commit 85e0462

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Website
2+
3+
on:
4+
push:
5+
branches: ["gh-pages"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
- name: Setup Ruby
24+
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
25+
with:
26+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27+
cache-version: 0 # Increment this number if you need to re-download cached gems
28+
- name: Setup Pages
29+
id: pages
30+
uses: actions/configure-pages@v5
31+
- name: Build with Jekyll
32+
# Outputs to the './_site' directory by default
33+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
34+
env:
35+
JEKYLL_ENV: production
36+
- name: Upload artifact
37+
# Automatically uploads an artifact from the './_site' directory by default
38+
uses: actions/upload-pages-artifact@v3
39+
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
url: "https://expressjs.com"
2+
baseurl: "/"
3+
14
# Site settings
25

36
defaults:

0 commit comments

Comments
 (0)