Skip to content

Commit

Permalink
Check actions permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
rs028 committed Feb 3, 2024
1 parent 9b17381 commit cac8d52
Showing 1 changed file with 36 additions and 33 deletions.
69 changes: 36 additions & 33 deletions .github/workflows/tex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,44 +42,47 @@ jobs:
contents: write

steps:
- name: Check Token Permissions
run: |
echo "Token Permissions: $(curl -sSL -H "Authorization: Bearer $ACTIONS_RUNTIME_TOKEN" https://api.github.com/repos/AtChem/AtChem2 | jq .permissions)"
# -------------------------------------------------------------
# 1. Checkout the repository from the branch associated with the
# current Pull Request
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.head_ref }}
# - name: Checkout repo
# uses: actions/checkout@v4
# with:
# fetch-depth: 2
# ref: ${{ github.head_ref }}

# -------------------------------------------------------------
# 2. Setup TeXLive and Inkscape (v1.x), then run the script to
# generate the pdf file of the manual
- name: Setup TexLive and compile the manual
uses: xu-cheng/texlive-action@v2
with:
scheme: full
run: |
# install inkscape
apk add inkscape
# run script to generate the pdf file
./tools/make_manual_pdf.sh
# # -------------------------------------------------------------
# # 2. Setup TeXLive and Inkscape (v1.x), then run the script to
# # generate the pdf file of the manual
# - name: Setup TexLive and compile the manual
# uses: xu-cheng/texlive-action@v2
# with:
# scheme: full
# run: |
# # install inkscape
# apk add inkscape
# # run script to generate the pdf file
# ./tools/make_manual_pdf.sh

- name: Upload pdf file as artifact
uses: actions/upload-artifact@v4
with:
name: AtChem2-Manual.pdf
path: doc/AtChem2-Manual.pdf
# - name: Upload pdf file as artifact
# uses: actions/upload-artifact@v4
# with:
# name: AtChem2-Manual.pdf
# path: doc/AtChem2-Manual.pdf

# -------------------------------------------------------------
# 3.
- name: Configure git
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
# # -------------------------------------------------------------
# # 3.
# - name: Configure git
# run: |
# git config --local user.name "github-actions[bot]"
# git config --local user.email "github-actions[bot]@users.noreply.github.com"

- name: Commit and Push
run: |
git add doc/AtChem2-Manual.pdf
git commit -m "Update AtChem2-Manual.pdf"
git push origin HEAD:${{ github.head_ref }}
# - name: Commit and Push
# run: |
# git add doc/AtChem2-Manual.pdf
# git commit -m "Update AtChem2-Manual.pdf"
# git push origin HEAD:${{ github.head_ref }}

0 comments on commit cac8d52

Please sign in to comment.