-
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.
- Loading branch information
Showing
3 changed files
with
75 additions
and
62 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build Project | ||
name: Build Project w/ PROS | ||
|
||
on: | ||
push: | ||
|
@@ -50,61 +50,4 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Build PROS Project | ||
run: pros make clean all | ||
|
||
docs: | ||
name: Compile Docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Generate LaTeX Files | ||
run: | | ||
python scripts/prosToMinted.py | ||
cp logo.png docs/output/ | ||
shell: sh | ||
|
||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
working_directory: 'docs/output/' | ||
|
||
root_file: main.tex | ||
latexmk_shell_escape: true | ||
latexmk_use_xelatex: true | ||
|
||
- name: Copy PDF | ||
run: | | ||
cp docs/output/main.pdf docs/main.pdf | ||
sudo rm -rf docs/output | ||
rm docs/output.zip | ||
shell: sh | ||
|
||
# - name: Update PDF release | ||
# uses: WebFreak001/[email protected] | ||
# with: | ||
# upload_url: https://uploads.github.com/repos/NoozAbooz/2088S-OverUnder-2024/releases/135895802/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | ||
# release_id: 135895802 # same as above (id can just be taken out the upload_url, it's used to find old releases) | ||
# asset_path: ./docs/main.pdf # path to archive to upload | ||
# asset_name: main.pdf # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | ||
# asset_content_type: application/zip # required by GitHub API | ||
# max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload entire repository | ||
path: './docs/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
run: pros make clean all |
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,70 @@ | ||
name: Compile LaTeX Docs | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
docs: | ||
name: Compile Docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Generate LaTeX Files | ||
run: | | ||
python scripts/prosToMinted.py | ||
cp logo.png docs/output/ | ||
shell: sh | ||
|
||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v3 | ||
with: | ||
working_directory: 'docs/output/' | ||
|
||
root_file: main.tex | ||
latexmk_shell_escape: true | ||
latexmk_use_xelatex: true | ||
|
||
- name: Copy PDF | ||
run: | | ||
cp docs/output/main.pdf docs/main.pdf | ||
sudo rm -rf docs/output | ||
rm docs/output.zip | ||
shell: sh | ||
|
||
# - name: Update PDF release | ||
# uses: WebFreak001/[email protected] | ||
# with: | ||
# upload_url: https://uploads.github.com/repos/NoozAbooz/2088S-OverUnder-2024/releases/135895802/assets{?name,label} # find out this value by opening https://api.github.com/repos/<owner>/<repo>/releases in your browser and copy the full "upload_url" value including the {?name,label} part | ||
# release_id: 135895802 # same as above (id can just be taken out the upload_url, it's used to find old releases) | ||
# asset_path: ./docs/main.pdf # path to archive to upload | ||
# asset_name: main.pdf # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | ||
# asset_content_type: application/zip # required by GitHub API | ||
# max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload entire repository | ||
path: './docs/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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