Build and deploy eQuantum site #85
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
# Deploy GitHub Pages | |
name: Build and deploy eQuantum site | |
# π Runs on workflow_run.conclusion | |
on: | |
workflow_run: | |
types: [completed] #requested | |
workflows: ["pages-build-deployment"] | |
# πͺ Allow only one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
# Set GITHUB_TOKEN scopes | |
permissions: write-all | |
# Sets global environtment variables | |
env: | |
USER: ${{ github.actor }} | |
REPO: ${{ github.repository }} | |
OWNER: ${{ github.repository_owner }} | |
ACTOR: ${{ github.triggering_actor }} | |
jobs: | |
# Build job | |
github-pages: | |
if: github.event.workflow_run.conclusion == 'success' | |
runs-on: ${{github.actor != github.repository_owner && 'ubuntu-latest' || ( | |
github.ref_name != 'main' && 'windows-latest' || 'self-hosted') }} | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.JEKYLL_GITHUB_TOKEN }} | |
- name: π Build on Linux | |
if: runner.os == 'Linux' | |
uses: eq19/feed@v2 | |
with: | |
pre_build_commands: 'make build' | |
token: ${{ secrets.JEKYLL_GITHUB_TOKEN }} | |
owner: ${{ secrets.JEKYLL_GITHUB_OWNER }} | |
- name: π Build on Windows | |
if: runner.os == 'Windows' | |
uses: eq19/maps@v1 | |
with: | |
dotnet-version: '3.1.x' | |
owner: ${{ secrets.JEKYLL_GITHUB_OWNER }} |