Skip to content

Update wording and add EDG logo (#4) #5

Update wording and add EDG logo (#4)

Update wording and add EDG logo (#4) #5

name: build_and_deploy
on:
push:
branches-ignore:
- master
# Serialize runs (replaces the CircleCI eddiewebb/queue orb).
concurrency:
group: build_and_deploy
cancel-in-progress: false
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true
- run: bundle exec jekyll build
deploy:
needs: test
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- uses: ruby/setup-ruby@v1
with:
ruby-version: '4.0'
bundler-cache: true
- run: bundle exec jekyll build
- name: Deploy to master
run: |
COMMIT_MESSAGE="$(git log -1 --pretty=%B)"
# Unlike the old CircleCI deploy (which preserved .circleci/ so CI
# config stayed on master), .github/ is intentionally NOT kept:
# GITHUB_TOKEN is not allowed to push workflow files, and the
# workflow ignores master anyway.
find . -maxdepth 1 ! -name '_site' ! -name '.git' -exec rm -rf {} \;
mv _site/* .
rm -r _site/
git config --global user.name "GitHub Actions"
git config --global user.email "actions@edgcpp.org"
git add .
git commit --allow-empty -m "$COMMIT_MESSAGE"
git push -f origin HEAD:master