DRAFT: Record translation change in json #3952
Workflow file for this run
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
on: | |
schedule: | |
- cron: '*/30 * * * *' | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- uses: astral-sh/setup-uv@v5 | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get install -y gettext | |
- run: uv run generate.py # generates "index.html" | |
- run: mkdir -p build && cp index.* style.css build | |
- name: Deploy 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build | |
clean: false | |
git-config-name: github-actions[bot] | |
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Deploy to subdirectory if pull request 🚀 | |
if: github.event_name == 'pull_request' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build | |
target-folder: ${{ github.ref_name }} | |
clean: false | |
git-config-name: github-actions[bot] | |
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Update PR description if pull request | |
if: github.event_name == 'pull_request' | |
uses: chabroA/[email protected] | |
with: | |
auth: ${{ secrets.GITHUB_TOKEN }} | |
repo: ${{ github.event.repository.name }} | |
owner: ${{ github.repository_owner }} | |
pr: ${{ github.event.number }} | |
url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/${{ github.ref_name }}/" | |
message: "📊 Dashboard preview 📊:" | |
- name: Debug index.html if pull request | |
if: github.event_name == 'pull_request' | |
run: | | |
curl -Lo index.html-public https://github.com/m-aciek/pydocs-translation-dashboard/raw/refs/heads/gh-pages/index.html | |
diff --color=always -u index.html-public index.html || : | |
cat index.html | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build |