mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 00:01:20 +00:00
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Update `error-prone.picnic.tech` website content
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ master ]
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
pages: write
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: true
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3.1.0
|
|
- uses: ruby/setup-ruby@v1.117.0
|
|
with:
|
|
working-directory: ./website
|
|
bundler-cache: true
|
|
- name: Configure Github Pages
|
|
uses: actions/configure-pages@v2.1.1
|
|
- name: Generate documentation
|
|
run: ./generate-docs.sh
|
|
- name: Build website with Jekyll
|
|
working-directory: ./website
|
|
run: bundle exec jekyll build
|
|
- name: Validate HTML output
|
|
working-directory: ./website
|
|
run: bundle exec htmlproofer --check-external-hash false ./_site
|
|
- name: Upload website as artifact
|
|
uses: actions/upload-pages-artifact@v1.0.4
|
|
with:
|
|
path: ./website/_site
|
|
deploy:
|
|
if: github.ref == 'refs/heads/master'
|
|
needs: build
|
|
runs-on: ubuntu-22.04
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v1.2.1
|