🚚 Apply locale pattern for translated file (#601) #126
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: Publish to website | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/publish-to-website.yml | |
- config/urls.yaml | |
- contributor/** | |
- introduction/** | |
- product-owner/** | |
- scripts/** | |
- trusted-committer/** | |
- workbook/** | |
# Checks if this workflow is already running, and if so cancels it | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Learning Path | |
uses: actions/checkout@v2 | |
with: | |
path: ./InnerSourceLearningPath | |
ssh-key: ${{ secrets.LEARNING_PATH_DEPLOY_KEY }} | |
- name: Update Learning Path links in translations | |
working-directory: InnerSourceLearningPath/scripts | |
run: | | |
npm ci | |
node update_links_in_translations.js | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git diff --quiet || (git commit -am "Update Links in Translations" && git push) | |
- name: Checkout innersourcecommons.org | |
uses: actions/checkout@v2 | |
with: | |
ssh-key: ${{ secrets.WEBSITE_DEPLOY_KEY }} | |
path: ./innersourcecommons.org | |
repository: InnerSourceCommons/innersourcecommons.org | |
fetch-depth: 0 | |
- name: Branch innersourcecommons.org | |
working-directory: innersourcecommons.org | |
run: | | |
git checkout | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: Build | |
working-directory: InnerSourceLearningPath/scripts | |
# The automated steps here need to be kept in sync manually with the written instructions at "/scripts/README.md" | |
# ("generate_learning_path_markdown.js" and "How to update innersourcecommons.org with new articles" sections). | |
run: | | |
npm ci | |
TOKEN=${{ secrets.GITHUB_TOKEN }} node generate_learning_path_markdown.js | |
cp -r newsite/. ../../innersourcecommons.org/content/en/learn/learning-path/ | |
- name : Commit | |
working-directory: innersourcecommons.org | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff --staged --quiet || (git commit -m "Update Learning Path articles" && git push) |