Repository navigation
Update wording and add EDG logo (#4) #5
This file contains hidden or 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
| 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 |