Skip to content

Update ol

Update ol #556

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 16
RUBY: 2.7
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
cache: npm
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY }}
bundler-cache: true
- run: java -version
- name: Install npm dependencies
run: npm ci
- name: Build the site
run: bundle exec jekyll build
- name: Run htmlproofer
run: bundle exec htmlproofer ./_site --allow-hash-href --assume-extension --check-external-hash --check-favicon --check-img-http --check-opengraph --disable-external --empty-alt-ignore --internal-domains sustainoss.org
- name: Run tests
run: npm test
- name: Upload docs
uses: actions/upload-artifact@v3
if: github.repository == 'sustainers/website' && github.ref == 'refs/heads/main'
with:
name: docs
path: ./_site/
deploy:
runs-on: ubuntu-latest
needs: test
if: github.repository == 'sustainers/website' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Download docs
uses: actions/download-artifact@v3
with:
name: docs
path: ./_site/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
allow_empty_commit: false
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_site/