generated from ApplebaumIan/tu-cis-4398-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
f63bb87
commit f86a6da
Showing
6 changed files
with
77 additions
and
11,536 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
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,54 @@ | ||
# .github/workflows/generate-pdf.yml | ||
name: Generate PDF | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
generate-pdf: | ||
runs-on: ubuntu-latest | ||
env: | ||
GIT_USER: ${{ secrets.USER }} | ||
GIT_PASS: ${{ secrets.TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Dependencies | ||
run: cd documentation && yarn install | ||
- name: Determine Semester | ||
id: semester | ||
run: | | ||
CURRENT_MONTH=$(date +%-m) | ||
CURRENT_YEAR=$(date +%Y) | ||
if [[ "$CURRENT_MONTH" -ge 1 && "$CURRENT_MONTH" -le 5 ]]; then | ||
SEMESTER="Spring" | ||
elif [[ "$CURRENT_MONTH" -ge 8 && "$CURRENT_MONTH" -le 12 ]]; then | ||
SEMESTER="Fall" | ||
else | ||
SEMESTER="Summer" | ||
fi | ||
echo "SEMESTER_YEAR=${SEMESTER} ${CURRENT_YEAR}" >> $GITHUB_ENV | ||
- name: Generate PDF | ||
run: | | ||
export PROJECT_NAME=$(echo ${GITHUB_REPOSITORY#*/}) | ||
cd documentation | ||
yarn pdf | ||
- name: Combine PDFs | ||
uses: amoeba/combine-pdf-action@v1 | ||
with: | ||
path: resources | ||
- name: Rename PDF | ||
run: | | ||
mv resources/combined.pdf syllabus.pdf | ||
- name: Upload PDF to Release | ||
uses: softprops/action-gh-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: "${{ github.run_number }}" | ||
name: ${{ env.SEMESTER_YEAR }} Course Syllabus | ||
files: syllabus.pdf | ||
draft: false | ||
prerelease: false |
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
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
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
Oops, something went wrong.