Merge pull request #41 from TemoaProject/pre-commit-ci-update-config #56
This file contains hidden or 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: Publish Dataset to R2 | |
| on: | |
| push: | |
| branches: ["main"] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish-data: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Allow pushing commits to the repository | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # We need the full commit history to get the commit hash | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install project and dependencies | |
| run: | | |
| uv sync --all-extras --dev | |
| uv pip install -e . --no-deps | |
| - name: Run Publish Script | |
| run: uv run .github/scripts/publish_script.py | |
| env: | |
| R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} | |
| R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| R2_PRODUCTION_BUCKET: ${{ vars.R2_PRODUCTION_BUCKET }} # Use repo variable | |
| R2_STAGING_BUCKET: ${{ vars.R2_STAGING_BUCKET }} # Use repo variable |