Deploying to staging triggered by Allimonae #43
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: Deploy to staging | |
| run-name: Deploying to staging triggered by ${{ github.actor }} | |
| concurrency: | |
| group: deploy-staging | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| statuses: write | |
| checks: write | |
| jobs: | |
| backend-pretest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/backend-pretest | |
| frontend-pretest: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: js | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/frontend-pretest | |
| backend-test: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| needs: backend-pretest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/backend-test | |
| frontend-test: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| needs: frontend-pretest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Run workflow | |
| uses: ./.github/composite/test/frontend-test | |
| migrate-database: | |
| name: Migrate staging database | |
| runs-on: ubuntu-latest | |
| needs: [backend-test, frontend-test] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - name: Setup CI | |
| uses: ./.github/composite/setup-ci | |
| with: | |
| SECRETS: ${{ toJSON(secrets) }} | |
| - name: Run workflow | |
| uses: ./.github/composite/db/migrate | |
| with: | |
| ENVIRONMENT: staging |