-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create compile_and_publish.yml action
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Compile And Publish | ||
|
||
# Controls when the workflow will run | ||
on: | ||
|
||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
# Compile and build the Latex files | ||
build: | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
# Compile and build the LaTex document | ||
- name: Build LaTeX document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
latexmk_use_xelatex: true | ||
# Specify document to compile | ||
root_file: curriculum_vitae.tex | ||
|
||
# Build the Github page | ||
- name: Build Github page | ||
run: mv curriculum_vitae.pdf _site/David_Davo_CV_English.pdf | ||
|
||
# TODO: Check what this actions does | ||
- name: Upload GitHub Pages artifact | ||
uses: actions/[email protected] | ||
|
||
# Deploy to Github pages | ||
deploy: | ||
|
||
# This job requires the build one to be executed first | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
# Deploy to Github pages | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
with: | ||
artifact-name: build |