Skip to content

Update hiring-mirror-and-delete.yml #115

Update hiring-mirror-and-delete.yml

Update hiring-mirror-and-delete.yml #115

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Combined workflow for testing and deploying a Jekyll site to GitHub Pages
name: CI/CD for Jekyll site
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Runs on pull requests targeting the default branch
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Combined test and build job
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
with:
ruby-version: '3.3'
bundler-cache: true
cache-version: 0
- name: Install dependencies
run: bundle install
- name: Check for syntax errors
run: bundle exec jekyll doctor
- name: Build Jekyll site for testing
run: bundle exec jekyll build --strict_front_matter
env:
JEKYLL_ENV: development
- name: Test HTML
if: github.event_name == 'workflow_dispatch'
run: |
gem install html-proofer
htmlproof ./_site --disable-external --checks-to-ignore links
- name: Test CSS
run: |
npm install -g csslint
find ./_site -name "*.css" -exec csslint {} \;
- name: Check links
if: github.event_name == 'workflow_dispatch'
run: |
gem install html-proofer
htmlproof ./_site --disable-external --check-external-hash
- name: Setup Pages
if: github.event_name == 'push'
id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll for production
if: github.event_name == 'push'
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v4
# Deployment job
deploy:
if: github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: test-and-build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4