Skip to content

Don't cache stylesheet (#156) #526

Don't cache stylesheet (#156)

Don't cache stylesheet (#156) #526

Workflow file for this run

name: Build website
on:
push:
branches:
- "**"
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build website
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y ruby-bundler
name: Install prerequisites
- uses: actions/checkout@v4
- run: bundle install
name: Install bundle
- run: bundle exec jekyll build
name: Build website
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.WEBSITE_OPENSSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.WEBSITE_KNOWN_HOSTS }}
if: ${{ github.repository == 'FEniCS/web' && github.ref == 'refs/heads/main' }}
- name: rsync over ssh
run: rsync -r ./_site/* [email protected]:/var/www/vhosts/fenicsproject.org/newsite
if: ${{ github.repository == 'FEniCS/web' && github.ref == 'refs/heads/main' }}
- name: Upload build as artifact
uses: actions/upload-artifact@v3
with:
name: website
path: _site
if-no-files-found: error
if: ${{ github.repository == 'FEniCS/web' && github.ref != 'refs/heads/main' && github.event_name == 'pull_request' }}