name: Deploy site on: workflow_run: workflows: [Check for broken links] types: [completed] workflow_dispatch: permissions: contents: write jobs: deploy: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} # available images: https://github.com/actions/runner-images#available-images runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž๏ธ uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" bundler-cache: true - name: Update _config.yml โš™๏ธ uses: fjogeleit/yaml-update-action@main 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 export JEKYLL_ENV=production bundle exec jekyll build --lsi - name: Purge unused CSS ๐Ÿงน run: | npm install -g purgecss purgecss -c purgecss.config.js - name: Deploy ๐Ÿš€ if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@v4 with: folder: _site