update #87
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip | |
- name: Run test | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "action@github.com" | |
pipx run copier copy -f -d docker=True -d docs=True . build/ && cd build/ | |
pipx run poetry run task lint | |
- name: Push rendered project | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: | | |
REMOTE=https://${GITHUB_ACTOR}:${{ secrets.GH_PAT }}@github.com/${GITHUB_REPOSITORY}.git | |
git -C build push -fu $REMOTE HEAD:rendered |