name: CI/CD on: pull_request: # Runs whenever a pull request is created or updated push: # Runs whenever a commit is pushed to the repository branches: [master, develop, beta, hotfix/*] # ...on any of these branches workflow_dispatch: # Allows you to run this workflow manually from the Actions tab concurrency: group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' cancel-in-progress: true env: CXX: g++-4.8 FASTLY_ACTIVATE_CHANGES: true FASTLY_PURGE_ALL: true NODE_ENV: production SKIP_CLEANUP: true jobs: build-and-test-and-maybe-deploy: runs-on: ubuntu-latest environment: >- ${{ ( (github.ref == 'refs/heads/master') && 'production' ) || ( ( (github.ref == 'refs/heads/develop') || (github.ref == 'refs/heads/beta') || startsWith(github.ref, 'refs/heads/hotfix/') || startsWith(github.ref, 'refs/heads/release/') ) && 'staging' ) || '' }} env: # SCRATCH_ENV comes from the GitHub Environment # See https://github.com/scratchfoundation/scratch-www/settings/variables/actions SCRATCH_SHOULD_DEPLOY: ${{ vars.SCRATCH_ENV != '' }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 with: cache: 'npm' node-version-file: '.nvmrc' - name: info run: | cat <