Merge pull request #376 from daschuer/Eve00000-Mixxx_2_5_Announcement #178
This file contains 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: website | |
on: | |
push: | |
branches: | |
- website | |
jobs: | |
update-news-date: | |
name: Update post news date | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Update dates of news posts | |
run: tools/update_news_date.py -b website content/news/ | |
- name: Check if changes any changes were made | |
run: echo "GIT_DIRTY=$(git diff --quiet ; printf "%d" "$?")" >> "${GITHUB_ENV}" | |
- uses: EndBug/add-and-commit@v9 | |
if: env.GIT_DIRTY != null && env.GIT_DIRTY != '0' | |
with: | |
add: 'content/news' | |
message: 'content/news: Update blog post date after merge' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Trigger Netlify build | |
if: env.NETLIFY_BUILD_HOOK != null && env.GIT_DIRTY != null && env.GIT_DIRTY != '0' | |
run: curl -X POST -d {} ${{ env.NETLIFY_BUILD_HOOK }} | |
env: | |
NETLIFY_BUILD_HOOK: ${{ secrets.NETLIFY_BUILD_HOOK }} |