Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eq19 authored Jun 24, 2024
1 parent dd03070 commit 4f0f01c
Showing 1 changed file with 27 additions and 38 deletions.
65 changes: 27 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Deploy GitHub Pages
name: Build and deploy eQuantum site

# 💎 Runs on workflow_run.conclusion
# Runs on workflow_run.conclusion
on:
push:
workflow_run:
types: [completed]
workflows: ["pages-build-deployment"]

# 🪂 Allow concurrent deployment
# Allow concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
Expand All @@ -30,23 +30,42 @@ jobs:
outputs:
runner: ${{ steps.set-runner.outputs.use-runner }}
steps:
- uses: eq19/eq19.github.io@v1
- name: 📂 Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.ACCESS_TOKEN }}

- name: 🪂 Build Dev Container
if: ${{ contains(github.repository, 'github.io') }}
uses: eq19/eq19.github.io@v1
with:
docker_hub_username: "eq19"
docker_hub_username: ${{ github.actor }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
dockerfile_path: ./.devcontainer/Dockerfile
image_name: "prime"
image_tag: "latest"

- name: Determine which runner to use
id: set-runner
- name: 🚀 Terminate Runner
uses: eq19/maps@v2
with:
primary-runner: "self-hosted,linux"
fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.ACCESS_TOKEN }}
credentials: ${{ secrets.GCP_CREDENTIALS }}

- name: 🚀 Build Feed on Linux
uses: eq19/feed@v3
with:
pre_build_commands: 'make build'
token: ${{ secrets.ACCESS_TOKEN }}

- name: 🚀 Build Self-Hosted Runner
id: set-runner
uses: eq19/lexer@v1
with:
pre_build_commands: 'gcloud info'
token: ${{ secrets.ACCESS_TOKEN }}

github-pages:
needs: determine-runner

Expand All @@ -67,43 +86,13 @@ jobs:

steps:
- name: 📂 Checkout
if: runner.os == 'Linux'
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ACCESS_TOKEN }}

- name: 📂 Setup Dotnet
- name: 💎 Setup Dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'

- name: 💎 Set Credential
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}

- name: 💎 Authentication
uses: 'google-github-actions/setup-gcloud@v2'

- name: 🚀 Self-Hosted Runner
if: runner.os == 'Linux'
uses: eq19/lexer@v3
with:
pre_build_commands: 'gcloud info'
token: ${{ secrets.ACCESS_TOKEN }}

- name: 🚀 Build on Self-Hosted
if: ${{runner.os != 'Linux' && runner.os != 'Windows'}}
uses: eq19/maps@v1
with:
path-to-root: /github/workspace/_site
include-pdf: false

- name: 🚀 Build Feed on Linux
if: runner.os == 'Linux'
uses: eq19/feed@v3
with:
pre_build_commands: 'make build'
token: ${{ secrets.ACCESS_TOKEN }}tnet-version: '3.1.x'

0 comments on commit 4f0f01c

Please sign in to comment.