feat: ✨ add verify_package_properties()
#883
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
# From: https://github.com/superfly/fly-pr-review-apps | |
name: Deploy PR Preview App | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, closed] | |
branches: | |
- main | |
paths-ignore: | |
# Config files | |
- ".github/**" | |
- ".vscode/**" | |
- ".gitignore" | |
# Documentation | |
- "docs/**" | |
- "*.md" | |
- "*.qmd" | |
- "justfile" | |
# Website files | |
- _quarto.yml | |
- index.qmd | |
- _publish.yml | |
- _extensions/** | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
FLY_REGION: ams | |
FLY_ORG: seedcase-project | |
jobs: | |
lint: | |
uses: seedcase-project/.github/.github/workflows/lint-python.yml@main | |
test: | |
uses: seedcase-project/.github/.github/workflows/test.yml@main | |
needs: lint | |
staging-app: | |
runs-on: ubuntu-latest | |
needs: test | |
# Only run one deployment at a time per PR. | |
concurrency: | |
group: pr-${{ github.event.number }} | |
# Create a GitHub deployment environment per staging app so it shows up | |
# in the pull request UI. | |
environment: | |
name: pr-${{ github.event.number }} | |
url: ${{ steps.deploy.outputs.url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Deploy preview of PR | |
id: deploy | |
uses: superfly/[email protected] | |
with: | |
name: ${{ github.event.repository.name }}-pr-${{ github.event.number }} | |
# This removes left over environments in GitHub from the building and deploying. | |
- name: Clean up GitHub environment | |
run: | | |
gh api \ | |
--method DELETE \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
/repos/seedcase-project/${{ github.event.repository.name }}/environments/pr-${{ github.event.number }} | |
if: ${{ github.event.action == 'closed' }} | |
env: | |
GH_TOKEN: ${{ secrets.DELETE_ENV_TOKEN }} |