Merge pull request #17 from PSDTools/dependabot/npm_and_yarn/build-8e… #50
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
--- | |
name: Continuous Integration | |
on: | |
# Run on pushes to the default branch. | |
push: | |
branches: | |
- main | |
# Run on all PRs. | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
# Support merge queues. | |
merge_group: | |
# Run on a schedule. | |
schedule: | |
- cron: "0 14 * * 1" # Every Monday at 9 in the morning CST | |
# Allow running this workflow manually from the Actions tab. | |
workflow_dispatch: | |
env: | |
DENO_VERSION: v1.44.4 | |
permissions: | |
contents: read # Needed to clone the repository | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
submodules: recursive | |
clean: true | |
persist-credentials: false | |
set-safe-directory: true | |
- name: ⠨⠿ Install pnpm | |
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
with: | |
package_json_file: package.json | |
- name: ⬢ Install Node | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
with: | |
node-version-file: package.json | |
cache: "pnpm" | |
- name: ⚙️ Cache Turbo | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
id: cache-turbo | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: 📦 Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: 🌐 Disable analytics | |
run: pnpm exec turbo telemetry disable | |
- name: 🔨 Build | |
run: pnpm run build | |
- name: ⚙️ Upload GPA Calculator | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | |
with: | |
name: gpa-calculator | |
path: "./apps/gpa-calculator/dist/" | |
if-no-files-found: error | |
- name: ⚙️ Upload Map | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | |
with: | |
name: phs-map | |
path: "./apps/phs-map/dist/" | |
if-no-files-found: error | |
deploy-calculator: | |
name: Deploy GPA Calculator | |
needs: [build] | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
permissions: | |
id-token: write # Needed for auth with Deno Deploy | |
concurrency: | |
group: ${{ github.workflow }}=${{ github.ref }}-deploy-calculator | |
cancel-in-progress: true | |
steps: | |
- name: 🦕 Install Deno | |
uses: denoland/setup-deno@5fae568d37c3b73449009674875529a984555dd1 # v1.3.0 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- name: ⚙️ Download GPA Calculator | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: gpa-calculator | |
path: "./apps/gpa-calculator/dist/" | |
- name: 🔧 Upload to Deno Deploy | |
id: deploy | |
uses: denoland/deployctl@612f83df2b874c6908d68de5cf3f36a6538fa8f7 # 1.12.0 | |
with: | |
project: "gpa-calculator" | |
entrypoint: https://deno.land/[email protected]/http/file_server.ts | |
root: "./apps/gpa-calculator/dist/" | |
deploy-map: | |
name: Deploy Map | |
needs: [build] | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
permissions: | |
id-token: write # Needed for auth with Deno Deploy | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-deploy-map | |
cancel-in-progress: true | |
steps: | |
- name: 🦕 Install Deno | |
uses: denoland/setup-deno@5fae568d37c3b73449009674875529a984555dd1 # v1.3.0 | |
with: | |
deno-version: ${{ env.DENO_VERSION }} | |
- name: ⚙️ Download Map | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: phs-map | |
path: "./apps/phs-map/dist/" | |
- name: 🔧 Upload to Deno Deploy | |
id: deploy | |
uses: denoland/deployctl@612f83df2b874c6908d68de5cf3f36a6538fa8f7 # 1.12.0 | |
with: | |
project: "phs-map" | |
entrypoint: https://deno.land/[email protected]/http/file_server.ts | |
root: "./apps/phs-map/dist/" |