diff --git a/.github/workflows/axe.yml b/.github/workflows/axe.yml index b3c1638751af..3e53bf4d96be 100644 --- a/.github/workflows/axe.yml +++ b/.github/workflows/axe.yml @@ -28,14 +28,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž๏ธ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2.2" + ruby-version: "3.3" bundler-cache: true - name: Update _config.yml โš™๏ธ - uses: fjogeleit/yaml-update-action@v0.13.1 + uses: fjogeleit/yaml-update-action@main with: commitChange: false valueFile: "_config.yml" @@ -48,9 +48,11 @@ jobs: run: | pip3 install --upgrade jupyter npm install -g mermaid.cli - npm install -g purgecss export JEKYLL_ENV=production bundle exec jekyll build --lsi + - name: Purge unused CSS ๐Ÿงน + run: | + npm install -g purgecss purgecss -c purgecss.config.js - name: Run axe ๐Ÿช“ # https://github.com/dequelabs/axe-core-npm/tree/develop/packages/cli diff --git a/.github/workflows/broken-links-site.yml b/.github/workflows/broken-links-site.yml index 4ed26246170c..6ed5c2d9839e 100644 --- a/.github/workflows/broken-links-site.yml +++ b/.github/workflows/broken-links-site.yml @@ -1,33 +1,29 @@ name: Check for broken links on site on: - push: - branches: - - master - - main - pull_request: - branches: - - master - - main - workflow_dispatch: + workflow_run: + workflows: [Deploy site] + types: [completed] permissions: contents: write jobs: - deploy: + check-links-on-site: + # 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' }} # available images: https://github.com/actions/runner-images#available-images runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž๏ธ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2.2" + ruby-version: "3.3" bundler-cache: true - name: Update _config.yml โš™๏ธ - uses: fjogeleit/yaml-update-action@v0.13.1 + uses: fjogeleit/yaml-update-action@main with: commitChange: false valueFile: "_config.yml" @@ -40,9 +36,11 @@ jobs: run: | pip3 install --upgrade jupyter npm install -g mermaid.cli - npm install -g purgecss export JEKYLL_ENV=production bundle exec jekyll build --lsi + - name: Purge unused CSS ๐Ÿงน + run: | + npm install -g purgecss purgecss -c purgecss.config.js - name: Link Checker ๐Ÿ”— uses: lycheeverse/lychee-action@v1.9.0 diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 524de8144d02..c91796fdb1db 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -2,13 +2,43 @@ name: Check for broken links on: push: + branches: + - master + - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/prettier.yml" pull_request: + branches: + - master + - main + paths: + - "assets/**" + - "**.html" + - "**.js" + - "**.liquid" + - "**/*.md" + - "**.yml" + - "!.github/workflows/axe.yml" + - "!.github/workflows/deploy-docker-tag.yml" + - "!.github/workflows/deploy-image.yml" + - "!.github/workflows/docker-slim.yml" + - "!.github/workflows/prettier.yml" jobs: link-checker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Link Checker ๐Ÿ”— uses: lycheeverse/lychee-action@v1.9.0 diff --git a/.github/workflows/deploy-docker-tag.yml b/.github/workflows/deploy-docker-tag.yml index 188dc5272b5e..fadfff665e9a 100644 --- a/.github/workflows/deploy-docker-tag.yml +++ b/.github/workflows/deploy-docker-tag.yml @@ -4,6 +4,13 @@ on: push: tags: - "v*" + paths: + - "bin/entry_point.sh" + - "Dockerfile" + - "Gemfile" + - "Gemfile.lock" + - "package.json" + - "package-lock.json" jobs: build: @@ -11,28 +18,28 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: amirpourmand/al-folio - name: Login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64/v8 diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 13dd3ffc13d2..133f22d7d143 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -2,7 +2,16 @@ name: Docker Image CI on: push: - branches: [master] + branches: + - master + - main + paths: + - "bin/entry_point.sh" + - "Dockerfile" + - "Gemfile" + - "Gemfile.lock" + - "package.json" + - "package-lock.json" jobs: build: @@ -11,22 +20,22 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . push: true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 908e32e5047a..9fabe63a62cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,14 +1,9 @@ name: Deploy site on: - push: - branches: - - master - - main - pull_request: - branches: - - master - - main + workflow_run: + workflows: [Check for broken links] + types: [completed] workflow_dispatch: permissions: @@ -16,18 +11,20 @@ permissions: 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@v3 + uses: actions/checkout@v4 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "3.2.2" + ruby-version: "3.3" bundler-cache: true - name: Update _config.yml โš™๏ธ - uses: fjogeleit/yaml-update-action@v0.13.1 + uses: fjogeleit/yaml-update-action@main with: commitChange: false valueFile: "_config.yml" @@ -37,9 +34,11 @@ jobs: run: | pip3 install --upgrade jupyter npm install -g mermaid.cli - npm install -g purgecss 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' diff --git a/.github/workflows/docker-slim.yml b/.github/workflows/docker-slim.yml index aafb5624d052..8c8cf71b85fc 100644 --- a/.github/workflows/docker-slim.yml +++ b/.github/workflows/docker-slim.yml @@ -14,19 +14,19 @@ on: jobs: build: + # 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' }} and github.repository_owner == 'alshedivat' runs-on: ubuntu-latest - if: github.repository_owner == 'alshedivat' - defaults: run: working-directory: ${{ github.workspace }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -34,7 +34,7 @@ jobs: - name: update docker-compose shell: bash run: | - sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml + sed -i "s|\.:|${{ github.workspace }}:|g" ${{ github.workspace }}/docker-compose.yml cat ${{ github.workspace }}/docker-compose.yml - uses: kitabisa/docker-slim-action@v1.0.3 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 3749b4f1b507..c71cd3939580 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout ๐Ÿ›Ž๏ธ - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js โš™๏ธ uses: actions/setup-node@v4 - name: Install Prettier ๐Ÿ’พ diff --git a/INSTALL.md b/INSTALL.md index 9ee5ab2563e1..42a5d8a4820f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -181,9 +181,9 @@ jobs: steps: # To use this repository's private action, you must check out the repository - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: actions-template-sync - uses: AndreasAugustin/actions-template-sync@v0.7.3 + uses: AndreasAugustin/actions-template-sync@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} source_repo_path: alshedivat/al-folio diff --git a/_config.yml b/_config.yml index 714ead79414e..838296a529cc 100644 --- a/_config.yml +++ b/_config.yml @@ -206,13 +206,23 @@ kramdown: include: ["_pages"] exclude: - bin + - CONTRIBUTING.md + - CUSTOMIZE.md + - docker-compose.yml + - Dockerfile + - FAQ.md - Gemfile - Gemfile.lock + - INSTALL.md + - LICENSE + - package.json + - package-lock.json + - purgecss.config.js + - README.md - vendor keep_files: - CNAME - .nojekyll - - .git # Plug-ins plugins: diff --git a/purgecss.config.js b/purgecss.config.js index 2add9d2f7389..094dc6e77898 100644 --- a/purgecss.config.js +++ b/purgecss.config.js @@ -1,6 +1,6 @@ module.exports = { - content: ["_site/**/*.html", "_site/**/*.js"], + content: ["_site/**.html", "_site/**.js"], css: ["_site/assets/css/*.css"], output: "_site/assets/css/", - skippedContentGlobs: ["_site/assets/**/*.html"], + skippedContentGlobs: ["_site/assets/**.html"], };