From cbb60462b4243f57e2ba6fab2600866a46381cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ti=E1=BA=BFn=20Nguy=E1=BB=85n=20Kh=E1=BA=AFc?= Date: Tue, 11 Jun 2024 15:07:58 +1200 Subject: [PATCH] ci: documentation deployment workflow --- .github/actions/setup/action.yml | 14 ++++++++++++++ .github/workflows/apps.yml | 25 +++++++++++++++++++++++++ .nvmrc | 1 + 3 files changed, 40 insertions(+) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/apps.yml create mode 100644 .nvmrc diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 00000000..1ccc57cc --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,14 @@ +name: Setup + +description: Checkout repository & install dependencies + +runs: + using: composite + steps: + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: yarn + + - run: yarn install --immutable + shell: bash diff --git a/.github/workflows/apps.yml b/.github/workflows/apps.yml new file mode 100644 index 00000000..7ac5ad64 --- /dev/null +++ b/.github/workflows/apps.yml @@ -0,0 +1,25 @@ +name: Applications + +on: + push: + branches: [main] + +jobs: + deploy-documentation: + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + + - run: yarn build + + - uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: reactive-dot + directory: apps/docs/build diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..b009dfb9 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/*