Skip to content

Add open graph image tag #86

Add open graph image tag

Add open graph image tag #86

Workflow file for this run

name: Unstable Pipeline
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
- development/web
pull_request:
branches:
- web
permissions:
pages: write
id-token: write
contents: write
jobs:
unstable-linux:
name: Build and release for Linux
runs-on: ubuntu-latest
outputs:
artifact_link: ${{ steps.generate-artifact-link.outputs.artifact_link }}
sha_short: ${{ steps.generate-artifact-link.outputs.sha_short }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main
- name: Install Glfw3
run: |
sudo apt-get update
sudo apt-get install libegl1-mesa-dev libwayland-dev libxkbcommon-dev xorg-dev
- name: Set commit hash
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Build and compile
run: |
mkdir build && cd build && cmake .. && make
- name: Upload artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: json_x_glfw_opengl3-linux-amd64_unstable_${{ env.SHA_SHORT }}
path: build/json_x_glfw_opengl3-linux-amd64_${{ env.SHA_SHORT }}
- name: Set artifact link
id: generate-artifact-link
run: |
echo "artifact_link=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}" >> "$GITHUB_OUTPUT"
echo "sha_short=${{ env.SHA_SHORT }}" >> "$GITHUB_OUTPUT"
web-build:
name: Web page build
needs: [unstable-linux]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Compile HTML
run: |
export LINUX_DOWNLOAD_HREF=${{ needs.unstable-linux.outputs.artifact_link }}
export LINUX_DOWNLOAD=json_x_glfw_opengl3-linux-amd64_unstable_${{ needs.unstable-linux.outputs.sha_short }}
sed -e "s#linux-download-href#$LINUX_DOWNLOAD_HREF#g" \
-e "s#linux-download#$LINUX_DOWNLOAD#g" \
index.html > temp.html
mv temp.html index.html
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}