Enable building the website with CI

This commit is contained in:
Yuri Sizov
2023-01-09 17:54:31 +03:00
parent 2fa65521ee
commit d7505b0d4e
4 changed files with 54 additions and 3 deletions

50
.github/workflows/build-website.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Build and publish
on:
workflow_dispatch:
push:
branches: [ master ]
# Make sure jobs cannot overlap (e.g. one from push and one from schedule).
concurrency:
group: published-ci
cancel-in-progress: true
jobs:
build:
name: Build and deploy to the published branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
# Configure the build environment.
- name: Install Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
# Runs 'bundle install' and caches installed gems automatically
bundler-cache: true
# Build the website.
- name: Build the static website
run: bundle exec jekyll build
# Publish the build results
- name: Deploy to the published branch 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: published
folder: _site
# Configure the commit author.
git-config-name: 'Godot Organization'
git-config-email: '<>'
# Remove outdated files from the target directory.
clean: true
# Don't keep the history.
single-commit: true

View File

@@ -68,6 +68,7 @@ PLATFORMS
arm64-darwin-22
x64-mingw-ucrt
x64-unknown
x86_64-linux
x86_64-linux-musl
DEPENDENCIES

View File

@@ -31,7 +31,8 @@ When working on new features, keep in mind this website only supports _evergreen
To build the website locally, follow these steps:
1. Install [Jekyll](https://jekyllrb.com/docs/installation/); make sure `bundle` is available from the command line.
1. Install [Jekyll prerequisites](https://jekyllrb.com/docs/installation/).
- Make sure `bundle` is available from the command line.
2. Clone this repository.
3. Install the necessary dependencies: `bundle install`.
4. Build the site: `bundle exec jekyll build`.

View File

@@ -12,8 +12,7 @@
<meta name="twitter:site" content="@godotengine">
<meta property="og:title" content="{{ page.title | default: 'Godot Engine' }}">
<meta property="og:description"
content="{{ page.description | default: 'Free and open source 2D and 3D game engine' }}">
<meta property="og:description" content="{{ page.description | default: 'Free and open source 2D and 3D game engine' }}">
<meta property="og:image" content="{{ page.image | default: '/assets/og_image.png' }}">
<meta property="og:type" content="{{ page.og_type | default: 'website' }}">
<meta name="twitter:card" content="summary_large_image">