diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b97e70e6..1dc162c1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,13 +4,25 @@ on: push: branches: - main + pull_request: + types: + - labeled concurrency: group: deploy-main cancel-in-progress: true +permissions: + contents: read + pull-requests: write + checks: read + statuses: read + actions: read + repository-projects: read + jobs: deploy: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'deploy') runs-on: ubuntu-latest steps: @@ -68,3 +80,10 @@ jobs: aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_region: ${{ vars.AWS_REGION }} aws_bucket_name: ${{ vars.AWS_BUCKET_NAME }} + + - name: Remove deploy label + if: github.event_name == 'pull_request' && github.event.label.name == 'deploy' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: gh pr edit ${{ github.event.pull_request.number }} --remove-label "deploy" diff --git a/web/src/ui/components/CardWorkout.vue b/web/src/ui/components/CardWorkout.vue index 98e81b04..d57cf6d8 100644 --- a/web/src/ui/components/CardWorkout.vue +++ b/web/src/ui/components/CardWorkout.vue @@ -51,13 +51,13 @@ const postComment = async () => {
- {{ workout.user?.firstName }} {{ workout.user?.lastName }} + {{ props.workout.user?.firstName }} {{ props.workout.user?.lastName }} - {{ formatToRelativeDateTime(workout.finishedAt) }} + {{ formatToRelativeDateTime(props.workout.finishedAt) }}