JEP REMI #64
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
# With some help from: https://gist.github.com/dgerosa/2e1f47a39180f39bde848e38243efa94 | |
name: build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
# Edit here with the names of your latex file and directory (can use ".") | |
DIR: . | |
FILEEN: david_doukhan_extended_cv_en | |
FILEFR: david_doukhan_extended_cv_fr | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: cven | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: ${{ env.FILEEN }} | |
working_directory: ${{ env.DIR }} | |
- name: cvfr | |
uses: dante-ev/latex-action@latest | |
with: | |
root_file: ${{ env.FILEFR }} | |
working_directory: ${{ env.DIR }} | |
- name: move | |
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/${{ env.FILEEN }}.pdf ${{ env.DIR }}/${{ env.FILEFR }}.pdf ./github_artifacts/ | |
- name: Upload pdfs as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pdfs | |
path: ./github_artifacts | |
deploy: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: github_artifacts | |
- name: move | |
run: mkdir -p github_deploy && mv github_artifacts/*/* github_deploy | |
- name: deploy on orphan branch | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./github_deploy | |
publish_branch: build | |
force_orphan: true | |
enable_jekyll: true | |
copy-index-to-build: | |
needs: [deploy] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Copy To Branches Action | |
uses: planetoftheweb/[email protected] | |
env: | |
key: main | |
files: index.html CNAME |