Added another GitHub action to check for broken local links on version of the site that will be deployed. The `broken-links` action check for broken links considering documentation files (like INSTALLING.md) and also pages like [_pages/about.md](https://github.com/alshedivat/al-folio/blob/master/_pages/about.md), but it can't check for broken links when the link will be handled by jekyll tags (like in [_pages/blog.md](https://github.com/alshedivat/al-folio/blob/master/_pages/blog.md). With `broken-links-site` we can check if all the links that will be used on the final site that refer to local files are correct. Focusing only on local files since this would end up calling too many checks for library files, like `https://unpkg.com/bootstrap-table@1.22.1/dist/bootstrap-table.min.css`. --------- Signed-off-by: George Araújo <george.gcac@gmail.com>
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Deploy site
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
deploy:
|
|
# available images: https://github.com/actions/runner-images#available-images
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout 🛎️
|
|
uses: actions/checkout@v3
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: "3.2.2"
|
|
bundler-cache: true
|
|
- name: Update _config.yml ⚙️
|
|
uses: fjogeleit/yaml-update-action@v0.13.1
|
|
with:
|
|
commitChange: false
|
|
valueFile: "_config.yml"
|
|
propertyPath: "giscus.repo"
|
|
value: ${{ github.repository }}
|
|
- name: Install and Build 🔧
|
|
run: |
|
|
pip3 install --upgrade jupyter
|
|
npm install -g mermaid.cli
|
|
npm install -g purgecss
|
|
export JEKYLL_ENV=production
|
|
bundle exec jekyll build --lsi
|
|
purgecss -c purgecss.config.js
|
|
- name: Deploy 🚀
|
|
if: github.event_name != 'pull_request'
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
folder: _site
|