mirror of
https://github.com/godotengine/godot-website.git
synced 2026-01-04 06:09:55 +03:00
Enable building the website with CI
This commit is contained in:
50
.github/workflows/build-website.yml
vendored
Normal file
50
.github/workflows/build-website.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user