Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Website

on:
push:
branches: ["main"]
tags:
- v*
workflow_dispatch:

jobs:
build-n-publish-website:
name: Build and publish lemonade-arcade.com website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: lemon
python-version: "3.10"
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
- name: Configure git
shell: bash -el {0}
run: |
git config --global user.name "Lemonade Bot"
git config --global user.email "lemonade@amd.com"
- name: Capture main branch commit hash
shell: bash -el {0}
run: |
echo "MAIN_COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Merge into website branch
shell: bash -el {0}
run: |
git checkout website
git merge origin/main -X theirs
- name: Push updates
shell: bash -el {0}
run: |
git add .
if git diff --staged --quiet; then
echo "No changes to commit, skipping commit step"
else
git commit -m "Update website for: ${MAIN_COMMIT_HASH}"
fi
git push
Loading