Update Scrum Master roles #77
Workflow file for this run
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: Generate and Translate PDFs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| push: true | |
| tags: ghcr.io/${{ github.repository_owner }}/latex-openai:latest | |
| build-and-translate: | |
| needs: build-docker | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| container: | |
| image: ghcr.io/${{ github.repository_owner }}/latex-openai:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| - name: Create output directory | |
| run: mkdir -p output | |
| - name: Compile LaTeX to PDF (English) | |
| run: | | |
| pdflatex -interaction=nonstopmode -output-directory=output resume.tex | |
| mv output/resume.pdf output/resume-eng.pdf | |
| - name: Translate .tex file to Swedish | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| run: python3 scripts/translate_resume.py | |
| - name: Print resume-sve.tex for debugging | |
| run: cat resume-sve.tex | |
| - name: Compile LaTeX to PDF (Swedish) | |
| run: | | |
| pdflatex -interaction=nonstopmode -output-directory=output resume-sve.tex | |
| mv output/resume-sve.pdf output/resume-sve.pdf | |
| - name: Upload PDFs to GitHub Pages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| git clone --depth 1 --branch gh-pages https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} gh-pages | |
| cp output/*.pdf gh-pages/ | |
| cd gh-pages | |
| git add . | |
| git commit -m "Update generated PDFs" | |
| git push |