Skip to content

Add a project configuration file #133

Add a project configuration file

Add a project configuration file #133

Workflow file for this run

name: scientific-python-lectures-auto-update
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
script:
permissions:
pull-requests: write
issues: write
repository-projects: write
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Get Job URL
uses: Tiryoh/gha-jobid-action@v1
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: script
- name: checkout with submodule
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
token: ${{ secrets.PERSONAL_ACCESSTOKEN }}
- name: Setup SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: install
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libopenblas-dev
(cd scientific-python-lectures; git fetch origin; git checkout main; git reset --hard origin/main; git branch -a)
pip3 install -U pip setuptools
pip3 install -r ./requirements.txt
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
mv tx /usr/local/bin/tx
- name: update
env:
SPHINXINTL_TRANSIFEX_ORGANIZATION_NAME: tkoyama010
SPHINXINTL_TRANSIFEX_USERNAME: api
SPHINXINTL_TRANSIFEX_PROJECT_NAME: scientific-python-lectures-doc
TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: |
sh ./locale/update.sh
- name: git_config
run: |
git config --global user.email $GITHUB_REPOSITORY
git config --global user.name $GITHUB_REPOSITORY
- name: commit
if: contains(github.event.head_commit.message, '[ci skip]') == false && contains(github.ref, 'main')
env:
JOB_ID: ${{ steps.jobs.outputs.job_id }}
HTML_URL: ${{ steps.jobs.outputs.html_url }}
run: |
git add .
git commit --allow-empty -m "[ci skip] $JOB_ID
$HTML_URL"
git remote -v
git remote add github git@github.com:$GITHUB_REPOSITORY.git
git push github main