Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Jekyll with GitHub Pages dependencies preinstalled | |
on: | |
release: | |
types: [created] | |
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: | |
check-codeql: | |
name: Check CodeQL Analysis | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up GitHub CLI | |
run: sudo apt-get install gh | |
- name: Authenticate GitHub CLI | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
run: echo "${{ secrets.GH_PAT }}" | gh auth login --with-token | |
- name: Check CodeQL Workflow | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
run: | | |
gh run list --workflow "CodeQL" --json conclusion --jq '.[0].conclusion' > codeql_status.txt | |
CODEQL_STATUS=$(cat codeql_status.txt) | |
if [[ "$CODEQL_STATUS" != "success" ]]; then | |
echo "CodeQL Analysis did not succeed. Exiting..." | |
exit 1 | |
fi | |
rm codeql_status.txt | |
build: | |
runs-on: ubuntu-24.04 | |
# Require the codeql job to complete successfully before running | |
needs: check-codeql | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.0" | |
- name: Install Jekyll | |
run: gem install jekyll | |
- name: Build with Jekyll | |
run: jekyll build -d ./_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
# Deployment job | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: [build, check-codeql] | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |