Skip to content

Commit

Permalink
ci: deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
guiseek committed Oct 10, 2024
1 parent 25ac668 commit 6e88e64
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
Expand All @@ -18,7 +15,8 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
- name: Checkout repository
uses: pnpm/action-setup@v4
with:
version: 9.12.1

Expand All @@ -27,13 +25,15 @@ jobs:
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"

- name: Install Node
# Cache node_modules
- uses: actions/setup-node@v4
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- name: Install dependencies
run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy

on:
push:
branches:
- main

jobs:
main:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # needed for provenance data generation
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout repository
uses: pnpm/action-setup@v4
with:
version: 9.12.1

- name: Install Node
# Cache node_modules
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- uses: nrwl/nx-set-shas@v4
- run: pnpm exec nx build devmx

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/apps/devmx/browser

0 comments on commit 6e88e64

Please sign in to comment.