Add Debug Repository Access in latex.yml #69
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
name: Build and Deploy CV to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up LaTeX environment | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: CV.tex | |
latexmk_use_lualatex: true | |
root: . | |
- name: Commit and Push changes to main branch | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add CV.pdf | |
git commit -m "Update CV.pdf" | |
git push origin main | |
- name: Debug Repository Access | |
env: | |
GITHUB_TOKEN: ${{ secrets.PRIVATE_REPO_PAT }} | |
run: | | |
echo "GITHUB_TOKEN ${GITHUB_TOKEN}" | |
git remote add private-repo https://x-access-token:${GITHUB_TOKEN}@github.com/nsswifter/AcademicApplicationDocuments.git | |
git ls-remote private-repo || echo "Failed to access repository" | |
- name: Debug Access | |
env: | |
GITHUB_TOKEN: ${{ secrets.PRIVATE_REPO_PAT }} | |
run: | | |
set -x | |
git remote add private-repo https://x-access-token:${GITHUB_TOKEN}@github.com/nsswifter/AcademicApplicationDocuments.git | |
git ls-remote private-repo | |
- name: Merge changes with private repository | |
env: | |
GITHUB_TOKEN: ${{ secrets.PRIVATE_REPO_PAT }} | |
run: | | |
git remote add private-repo https://x-access-token:${GITHUB_TOKEN}@github.com/nsswifter/AcademicApplicationDocuments.git | |
git fetch private-repo | |
git checkout main | |
git merge private-repo/main --allow-unrelated-histories | |
git push private-repo main |