diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 830dca4..0144461 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -4,8 +4,12 @@ name: Deploy static content to Pages on: push: branches: - - master + - master - main + +concurrency: + group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} permissions: contents: write jobs: @@ -20,7 +24,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v4 with: key: mkdocs-material-${{ env.cache_id }} @@ -28,4 +32,4 @@ jobs: restore-keys: | mkdocs-material- - run: pip install mkdocs mkdocstrings[python] mkdocs-material - - run: mkdocs gh-deploy --force \ No newline at end of file + - run: mkdocs gh-deploy --force diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 9acf204..fbfed60 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -2,7 +2,11 @@ name: Publish python poetry package on: # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] + branches: ["main"] + +concurrency: + group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: build: @@ -18,4 +22,4 @@ jobs: poetry config virtualenvs.create false poetry build echo "Publishing now..." - poetry publish -u "__token__" --password "$PYPI_TOKEN" || true \ No newline at end of file + poetry publish -u "__token__" --password "$PYPI_TOKEN" || true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3d393b..ab8b2f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,13 +6,17 @@ name: Tests on: # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main", "master" ] + branches: ["main", "master"] pull_request: - branches: [ "main", "master" ] + branches: ["main", "master"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: +concurrency: + group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} + jobs: test: # The type of runner that the job will run on @@ -25,7 +29,7 @@ jobs: # Runs a single command using the runners shell - name: Install dependencies - run: | + run: | sudo apt update -y sudo apt install gnome-keyring pip install --upgrade pip