[main] - test adding custom theme #177
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: cv-generation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| sync-everything: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
| fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
| - name: Create temporary folder | |
| id: mkdir | |
| run: | | |
| mkdir temporary | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Generate HTML and PDF files | |
| env: | |
| RESUME_PUPPETEER_NO_SANDBOX: 1 | |
| run: | | |
| npx resume-cli export temporary/cv.html --resume resume.json --theme ./themes/my-stackoverflow | |
| npx resume-cli export temporary/cv.pdf --resume resume.json --theme ./themes/my-stackoverflow | |
| - name: GIST - Deploy resume.json | |
| uses: exuanbo/actions-deploy-gist@v1 | |
| with: | |
| token: ${{ secrets.GHA_TOKEN_FOR_GISTS }} | |
| gist_id: bdfc617628bc7a2fc8763a2be6b1a816 | |
| file_path: resume.json | |
| file_type: binary | |
| - name: GIST - Deploy cv.pdf | |
| uses: exuanbo/actions-deploy-gist@v1 | |
| with: | |
| token: ${{ secrets.GHA_TOKEN_FOR_GISTS }} | |
| gist_id: bdfc617628bc7a2fc8763a2be6b1a816 | |
| file_path: temporary/cv.pdf | |
| file_type: binary | |
| - name: Commit published HTML | |
| id: git | |
| run: | | |
| git diff | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git checkout generated-page | |
| cp temporary/cv.html docs/view.html | |
| cp temporary/cv.pdf docs/cv.pdf | |
| cp temporary/cv.pdf docs/Iosif_Vigh-Senior_Software_Engineer.pdf | |
| git add docs/view.html | |
| git add docs/cv.pdf | |
| git add docs/Iosif_Vigh-Senior_Software_Engineer.pdf | |
| # Copy the index html file | |
| git checkout main -- index.html | |
| cp index.html docs/index.html | |
| git add docs/index.html | |
| # This needed just for legacy purposes for when I used to give the link: cv.iosifv.com/dl | |
| git checkout main -- dl.html | |
| cp dl.html docs/dl.html | |
| git add docs/dl.html | |
| git commit -m "Added generated file changes" | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| # https://github.com/marketplace/actions/github-push | |
| with: | |
| github_token: ${{ secrets.GHA_TOKEN_FOR_PUSH_EXPIRES_FEB_2026 }} | |
| branch: generated-page |