update deploy-pages #13
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: Labot checks | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
install-and-run: | |
runs-on: ubuntu-latest # Use the latest Ubuntu environment | |
permissions: | |
contents: write | |
issues: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install git+https://github.com/digital-work-lab/labot.git | |
pip install colrev | |
- name: Set Git user name and email | |
run: | | |
git config --global user.name "Labot" | |
git config --global user.email "[email protected]" | |
git config --global url.https://github.com/.insteadOf git://github.com/ | |
- name: workaround for detached HEAD | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
git fetch origin '+refs/heads/*:refs/remotes/origin/*' | |
git checkout ${GITHUB_HEAD_REF#refs/heads/} || git checkout -b ${GITHUB_HEAD_REF#refs/heads/} && git pull | |
- name: Run labot.repository.main() | |
run: | | |
python -m labot.repository | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_PAT_TOKEN }} |