mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-19 11:35:36 -04:00
Publish site via GitHub Actions
GitHub is shutting down the legacy build system towards the end of June. Migrate to using GitHub Actions. Add a test workflow for pull requests alongside it. This also gives us access to: - Updated Jekyll - Updated Ruby - Updated literally everything because GitHub's built-in thing was so old everything was crying in pain This also *probably* makes it build faster, but untested on GitHub...
This commit is contained in:
parent
784e162235
commit
5d8ca271f0
36
.github/workflows/publish.yml
vendored
Normal file
36
.github/workflows/publish.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Deploy site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
doc-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: '3.2'
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Run Jekyll
|
||||||
|
# Build the site using Jekyll
|
||||||
|
run: JEKYLL_ENV=production bundle exec jekyll build
|
||||||
|
|
||||||
|
# Copy (or touch) other needed files
|
||||||
|
# .nojekyll: to tell GH Pages to not rebuild (lol)
|
||||||
|
- name: Post-Jekyll build copy files
|
||||||
|
run: touch _site/.nojekyll
|
||||||
|
|
||||||
|
- name: Deploy 🚀
|
||||||
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
|
with:
|
||||||
|
branch: gh-pages # The branch the action should deploy to.
|
||||||
|
folder: _site # The folder the action should deploy.
|
||||||
|
clean: true # Automatically remove deleted files from the deploy branch
|
24
.github/workflows/test.yml
vendored
Normal file
24
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Test site build
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
doc-test:
|
||||||
|
if: github.ref_name != 'l10n'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: '3.2'
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Run Jekyll
|
||||||
|
# Build the site using Jekyll
|
||||||
|
run: JEKYLL_ENV=production bundle exec jekyll build
|
Loading…
Reference in New Issue
Block a user