mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
See: - https://github.com/actions/deploy-pages/releases/tag/v1.2.8 - https://github.com/actions/deploy-pages/releases/tag/v1.2.7 - https://github.com/actions/deploy-pages/releases/tag/v1.2.6 - https://github.com/actions/deploy-pages/releases/tag/v1.2.5 - https://github.com/actions/deploy-pages/releases/tag/v1.2.4
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: Update `error-prone.picnic.tech` website content
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ master, website ]
|
|
permissions:
|
|
contents: read
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3.1.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ruby/setup-ruby@v1.126.0
|
|
with:
|
|
working-directory: ./website
|
|
bundler-cache: true
|
|
- name: Configure Github Pages
|
|
uses: actions/configure-pages@v2.1.3
|
|
- 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
|
|
# XXX: Drop `--disable_external true` once we fully adopted the
|
|
# "Refaster rules" terminology on our website and in the code.
|
|
run: bundle exec htmlproofer --disable_external true --check-external-hash false ./_site
|
|
- name: Upload website as artifact
|
|
uses: actions/upload-pages-artifact@v1.0.5
|
|
with:
|
|
path: ./website/_site
|
|
deploy:
|
|
if: github.ref == 'refs/heads/website'
|
|
needs: build
|
|
permissions:
|
|
id-token: write
|
|
pages: write
|
|
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@dcda0bb2bcba68842abb9414982734cde54a96d8 # v1.2.8
|