Merge pull request #247 from Wizarrrr/master #5
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: Compile Translations | |
on: | |
push: | |
branches: | |
- translations | |
workflow_dispatch: {} | |
permissions: | |
packages: write | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo and the translations branch | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: translations | |
# Install dependencies node and npm | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y nodejs npm | |
# Install dependencies for frontend | |
- name: Install dependencies for frontend | |
run: | | |
cd frontend | |
npm install | |
# Compile translations | |
- name: Compile translations | |
run: | | |
cd frontend | |
npm run gettext:compile | |
# Commit and push changes | |
- name: Commit and push changes | |
env: | |
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --local user.name "GitHub Action" | |
git config --local user.email "<>" | |
git remote set-url origin "https://[email protected]/Wizarrrr/wizarr.git" | |
git add . | |
git commit -m "Compile translations" | |
git push origin translations |